]> andersk Git - moira.git/blobdiff - gen/nagios-printers.gen
Command line printer manipulation client, and build goo.
[moira.git] / gen / nagios-printers.gen
index 4c66cc913ffbb6b19e425b5ab0ab07895caecc73..adb48d28d44d34dcdcc7c0160bbcb3fbf4b15bc3 100755 (executable)
@@ -15,7 +15,7 @@ $dbh = DBI->connect("dbi:Oracle:moira", "moira", "moira")
 
 $sth = $dbh->prepare("SELECT m.name FROM machine m, printers p " .
                     "WHERE (p.type = 'DORM' OR p.type ='CLUSTER') " .
-                    "AND p.mach_id = m.mach_id")
+                    "AND p.mach_id = m.mach_id AND m.status=1")
     || exit $MR_DBMS_ERR;
 
 $sth->execute || exit $MR_DBMS_ERR;
@@ -33,6 +33,7 @@ define host{
        host_name               $name
        alias                   $name
        address                 $name
+       contact_groups          ops-printers
        use                     generic-host
        }
 
@@ -82,7 +83,6 @@ print OUT <<END;
 define hostgroup{
         hostgroup_name          printers
         alias                   printers
-        contact_groups          ops-printers
 END
 
 print OUT "\tmembers\t\t";
This page took 0.165397 seconds and 4 git commands to generate.