X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=nagios%2Fplc_hosts_to_nagios.py;h=f45fa76900d80f34b38cb20f58d915267aa65399;hb=b0e42d2612c679295c04f6a58da35d4f80c8c869;hp=302db9e17c174c55e59c47c4d2aa23aa982c0092;hpb=dcf94cd60b68ca3a3cd38a55d32bdf49b4639b99;p=monitor.git diff --git a/nagios/plc_hosts_to_nagios.py b/nagios/plc_hosts_to_nagios.py index 302db9e..f45fa76 100755 --- a/nagios/plc_hosts_to_nagios.py +++ b/nagios/plc_hosts_to_nagios.py @@ -1,5 +1,8 @@ #!/usr/bin/python + +import plc from nagiosobjects import * +from generic import * command_auto = Command(command_name="check_mode", command_line="""/usr/share/monitor/nagios/plugins/checkmode.py -H $HOSTNAME$ --sn $SERVICENOTIFICATIONNUMBER$ """) @@ -123,8 +126,6 @@ globalhost = [Host( name="planetlab-host", for obj in globalhost + globalservices: print obj.toString() -from monitor.wrapper import plc -from monitor.generic import * l_sites = plc.api.GetSites({'login_base' : ['asu', 'gmu', 'gt']}) #l_sites = plc.api.GetSites([10243, 22, 10247, 138, 139, 10050, 10257, 18, 20, @@ -300,7 +301,7 @@ for site in l_sites: service_description="cPCU", display_name="cPCU", servicegroups="NET,PCU", - notifications_enabled="0", + notifications_enabled="1", check_command="check_pcu") # NOTE: try to repair the host, if it is online and 'mode' indicates a problem