Plug-In Tutorials

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Plug-In Tutorials

Post by slansing »

Yes, we have established that that plugin is faulty, however the majority of the other apache plugins should work. Such as check_apache_status.pl

http://exchange.nagios.org/directory/Pl ... us/details

Test with the following command once it is uploaded:

Code: Select all

/usr/local/nagios/libexec/check_apache_status -H address.of.apache.server -v requests_per_second
A.Cormack
Posts: 103
Joined: Fri Nov 23, 2012 6:32 pm

Re: Plug-In Tutorials

Post by A.Cormack »

Yay!

Code: Select all

./check_apache_status -H 192.168.19.136 -v requests_per_second
Output:

Code: Select all

APACHE OK:requests_per_second is .00946
----
Command Management

Code: Select all

Command Name: check_apache_status
Command Line: $USER1$/check_apache_status -H $HOSTADDRESS$ -a $ARG1$
Command Type: check command
Service Management

Code: Select all

Config Name: check_apache_status
Check Command: check_apache_status
$ARG1$: -w 0.5 -c 2 
However, Nagios service screen outputs

Code: Select all

APACHE UNKNOWN: (0c/1w/4o)
So I'm guessing my $ARG1$ is wrong? Sorry about this, nearly there... well on one plugin lol
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Plug-In Tutorials

Post by sreinhardt »

If you are looking to get requests per second, you want the command definition to look something like:

Code: Select all

Command Name: check_apache_status
Command Line: $USER1$/check_apache_status -H $HOSTADDRESS$ -v requests_per_second $ARG1$
Command Type: check command
Then you can use arg1 to just hold warning and critical as you had done.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
A.Cormack
Posts: 103
Joined: Fri Nov 23, 2012 6:32 pm

Re: Plug-In Tutorials

Post by A.Cormack »

Seems to work like a treat! Thanks so much for your patience and help :).

I need to look for 2 more plug-ins now. is there anything I should be looking for when I select them? To make sure their compatable?
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Plug-In Tutorials

Post by sreinhardt »

That's tough to say, probably continue to look for ones that are recommended by others. Ideally also recently created or updated. You might also try searching the forums or google for the name before choosing it. If its alright with you, I would like to lock this one, and we can start another if you have issues with another plugin.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
A.Cormack
Posts: 103
Joined: Fri Nov 23, 2012 6:32 pm

Re: Plug-In Tutorials

Post by A.Cormack »

Yeah thats perfectly fine :). Thanks for your help. I'm gonna just grind away if I have any problems.... I've opened a few.. long and pointless threads lol.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Plug-In Tutorials

Post by slansing »

That's fine, just let us know if you run into a real stumper.
Locked