Host/Service Script Question

Dei Bertine deibertine at yahoo.com
Wed Apr 29 00:37:25 CEST 2009


Hi guys,

I was wondering if there's a way to incorporate all hosts into one host name instead of creating individual defines?
I'm trying to add all of our servers into Nagios but there's huge amount of them. 
Need faster way to add all of them into one script. 
Here's what I'm trying to avoid: 
define host{
        use                             generic-host
        host_name                sunbl.001.csaa.net
        alias                          UNIX-SERVER1 
        address                     172.168.1.35
        }
define host{
        use                             generic-host
        host_name                sunbl.002.csaa.net
        alias                          UNIX-SERVER2 
        address                     172.168.1.36
        }

.....and so on to hundreds of define host....

Here's what I'm trying to "hopefully" accomplish" if possible:
define host{
        use                            all-host
        host_name               allunixhosts
        alias                          ALL-UNIX 
        address                     ALLIP
        }

...done all hosts...

And also have them in one "all host" services.cfg script. 
define service{
        use                             all-service         
        host_name                 ALLHOSTSERVICE
        service_description             SSH
        check_command                   check_ssh
        }

define service{ 
       use                             all-service
       host_name                 ALLHOSTSERVICE
       service_description   PING
       check_command        check_ping
       }



Please advise. 

Thank you! 
DB


      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20090428/4904bf9b/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance & Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null


More information about the Users mailing list