defining new service on nagios xi

This support forum board is for support questions relating to Nagios xi, our flagship commercial network monitoring solution.
srikanth.kallu
Posts: 243
Joined: Thu Jul 26, 2012 10:48 am

defining new service on nagios xi

Post by srikanth.kallu »

I am trying to define new service on nagios xi

For example i want to check uptime on all the servers and alert me warning if uptime is more than 30 days and critical if more than 60 days.

Any help regardind this is highly appreciated.

Thank You.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: defining new service on nagios xi

Post by scottwilkerson »

This will depend on the type of servers you are monitoring...

In Windows (with NSClient++) you could use the following command
check_xi_service_nsclient
with the following

Code: Select all

$ARG1$ = <PASSWORD>
$ARG2$ = COUNTER
$ARG3$ = -l "\\System\\System Up Time","Uptime: %.f seconds" -w 2592000 -c 5184000
For *nix based systems I would find a plugin on the exchange, like
http://exchange.nagios.org/directory/Pl ... ns/details
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
srikanth.kallu
Posts: 243
Joined: Thu Jul 26, 2012 10:48 am

Re: defining new service on nagios xi

Post by srikanth.kallu »

My nagios server is linux and clients are AIX and Linux,

Do you have any documentation for

1. How to write a plugin
2. How to add that service to existing host.
3. How to define that command.

Thank You,
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: defining new service on nagios xi

Post by slansing »

We have a set of guidelines to go along with creating a plug-in in a standardized way, including an explanation of error codes and why they must be implemented. However the creation of the plug-in rests solely on the creator as there are so many possibilities. The guidelines are located here:

http://nagiosplug.sourceforge.net/devel ... lines.html

Plug-in API:

http://nagios.sourceforge.net/docs/3_0/pluginapi.html

Plug-in output:

http://nagiosplug.sourceforge.net/devel ... PLUGOUTPUT

There are several guides out there with explanations but your plugin is likely to differ to the point where it may not be very helpful, considering you can write plugins in just about any language.