graph a Monitored Service

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
lamin
Posts: 177
Joined: Thu Oct 28, 2010 6:59 am

graph a Monitored Service

Post by lamin »

Hello guys,
I am wondering if there is a way to graph a windows service (sql service, iis). The services i am watched only say "started" and when i go the performance graph nothing show up.
You do not have the required permissions to view the files attached to this post.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: graph a Monitored Service

Post by scottwilkerson »

lamin wrote:Hello guys,
I am wondering if there is a way to graph a windows service (sql service, iis). The services i am watched only say "started" and when i go the performance graph nothing show up.
This depends on what the plugin returns. Some return performance data and some do not.

http://nagiosplug.sourceforge.net/devel ... lines.html
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
lamin
Posts: 177
Joined: Thu Oct 28, 2010 6:59 am

Re: graph a Monitored Service

Post by lamin »

Attached is the plugin that i am using and i believe it is check_nt. So my question is it is doable?
You do not have the required permissions to view the files attached to this post.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: graph a Monitored Service

Post by scottwilkerson »

As I suspected. SERVICESTATE doesn't return performance data.

It would be possible, but you would have to write some kind of wrapper plugin
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
lamin
Posts: 177
Joined: Thu Oct 28, 2010 6:59 am

Re: graph a Monitored Service

Post by lamin »

So how can i get that done?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: graph a Monitored Service

Post by scottwilkerson »

Writing custom wrapper plugins really isn't what the Nagios XI support is for, however it would look something like this

Code: Select all

#!/bin/bash
LINE=`/usr/local/nagios/libexec/check_nt $*`
RC=$?
echo $LINE \| state=$RC
exit $RC
name it something unique like check_nt_wrapper upload the plugin ( Admin -> Manage Plugins )
add a new command to Configure -> Core Config Manager -> Commands like this

Code: Select all

Command*    check_nt_wrapper
Command line*   $USER1$/check_nt_wrapper -H $HOSTADDRESS$ -s "$ARG1$" -p 12489 -v $ARG2$ $ARG3$ $ARG4$
Then change the service command from
check_xi_service_nsclient
to
check_nt_wrapper
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
lamin
Posts: 177
Joined: Thu Oct 28, 2010 6:59 am

Re: graph a Monitored Service

Post by lamin »

Thanks for the assistance but can you please be more specific with the code because i really don't get it.

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

Re: graph a Monitored Service

Post by scottwilkerson »

Feel free to contact sales@nagios.com if you would like a quote on custom wrapper plugin.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart