Page 1 of 1

linux & windows alerts

Posted: Tue May 15, 2012 8:47 am
by lntinfo
i am monitoring 200 servers using nagios. server incluedes windows & Linux.
is there any way that i can come to know, alert comes from which operating system.
can i segregate linux & windows alerts.

Re: linux & windows alerts

Posted: Tue May 15, 2012 11:45 am
by lmiltchev
You can utilize a naming convention that would indicate whether your host is a linux or windows machine. Another way of doing it is to group your hosts into hostgroups if you haven't done this already, for example: "linux-servers" and "windows-servers". Then, you will have to add the $HOSTGROUPNAME$ macro in the command definitions. Read about standard macros in nagios here:

http://nagios.sourceforge.net/docs/nagi ... olist.html

Depending on whether your contacts are Nagios XI users or contacts only you may have to modify some or all of these commands:

For these two commands:

xi_host_notification_handler
xi_service_notification_handler


Go to the Core Config Manager->Commands->Commands->Modify and add the following to the command definition: --hostgroupname="$HOSTGROUPNAME$"

For these two commands:

notify-host-by-email
nofity-service-by-email

Go to the Core Config Manager->Commands->Commands->Modify and add the following to the command definition: \nHostgroup: $HOSTGROUPNAME$

Save and Apply Configuration.

Go to Configure->More Options->My Account Settings->Notifications Options->Notification Messages. Add the following line to the "Host and Service Alert Message" fields: Hostgroup: %hostgroupname% and click on "Update Settings".

Now when you receive a notification, you should see a line that says:

Hostgroup: linux-servers

or

Hostgroup: windows-servers

Hope this helps.

Re: linux & windows alerts

Posted: Wed May 16, 2012 12:46 am
by lntinfo
thanks a ton ! i shall try that.