Adding more IWndows Server in nagios

Hi

I’m testing with Nagios, but how can i add more servers in nagios?
Wich files must i edit to do that, only windows.cfg or windows.cfg and template.cfg?

I hope i give the right information.

Greets

WoodY112

Hi

Yes, you would probably be best off editing windows.cfg (although you can of course create a whole new file should your wish, you just need to specify it in nagios.cfg) - take a look at nagios.sourceforge.net/docs/3_0/ … ndows.html for more information

HTH

/S

Thank you for your information, buth i done that already, ant it’s working fine, but only when i add a new IP in windows.cfg, the file overrule the other IP

Buth i will check the nagios.cfg

Greets

WoodY112

Re-read the link… Each server needs it’s own host seperate object definition, you can’t just add IP addresses…

[blockquote]Steps
There are several steps you’ll need to follow in order to monitor a new Windows machine. They are:

  1. Perform first-time prerequisites
  2. Install a monitoring agent on the Windows machine
  3. Create new host and service definitions for monitoring the Windows machine
  4. Restart the Nagios daemon[/blockquote]
    Like…
    [blockquote]define host{
    use windows-server
    host_name winserver1
    alias Server1
    address 192.168.1.2
    }
    define host{
    use windows-server
    host_name winserver2
    alias Server2
    address 192.168.1.3
    }
    …etc
    [/blockquote]
    though you *can *put multiple hosts on a service check object, like
    [blockquote]define service{
    use generic-service
    host_name winserver1,winserver2
    service_description NSClient++ Version
    check_command check_nt!CLIENTVERSION
    }[/blockquote]

I’m sorry, i have readed over that, buth when i change my windows.cfg with a new server, and i restart nagios, then he won’t start up, and it’s comes with a error that my configuration isn’t good.

Run the config verification

(adjust any difference in your paths to suit) and review the error. If this does not help, post the error and your errant windows.cfg file.

I have found the problem, and i have add a second Windows server,.

Thanks for you Help!!!

Buth i have another question, how can i setup mail notification.
Where are useing already a Windows Exchange mail server, and he is working properly.

I configured postfix for relaying the mail to our mail server.
I followed the manual exactly and it works fine.

Howto Configure Postfix Configure Postfix For Relaying
To configure our Postfix server for relaying emails through smtp.example.com, we run :

postconf -e ‘relayhost = smtp.example.com

postconf -e ‘smtp_sasl_auth_enable = yes’

postconf -e ‘smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd’

postconf -e ‘smtp_sasl_security_options =’

Our username (nagios) and password (password) for smtp.example.com must be stored in /etc/postfix/sasl_passwd, therefore we do this:

echo “smtp.example.com nagios:Password” > /etc/postfix/sasl_passwd

/etc/postfix/sasl_passwd must be owned by root, and none else should have read access to that file, so we do this:

chown root:root /etc/postfix/sasl_passwd

chmod 600 /etc/postfix/sasl_passwd

Now we must convert /etc/postfix/sasl_passwd into a format that Postfix can read:

postmap /etc/postfix/sasl_passwd

This will create the file /etc/postfix/sasl_passwd.db.

echo "smtp.example.com " > /etc/postfix/sasl_passwd

Change name from :

echo “nagios [email protected]” > /etc/postfix/canonical

echo “canonical_maps = hash:/etc/postfix/canonica” >> /etc/postfix/main.cf

Now we must convert /etc/postfix/canonical into a format that Postfix can read:

postmap /etc/postfix/canonical

All that is left to do is restart Postfix:
#/etc/init.d/postfix restart