I have Nagios XI installed and want to monitor remote Centos 7.x machine using SSH plugin.
I used the configuration wizard and I was able to add the IP address of this host and I can monitor the basics.
Now I'm running apache services so how do I reconfigure this setting so I can monitor the status of the Apache Services?
Under the edit configuration host I located the "monitor this host with this command" but I don't know where to find the commands.
thanks,
ik
Monitor using SSH plugin to monitor Apache service?
Re: Monitor using SSH plugin to monitor Apache service?
If you are already setup to monitor the basic settings, you can copy an existing service check, modify it and that will be the easiest way to do that.
It you ran the SSH Proxy wizard, it should of creates a service check called Total Processes.
You can use that one as the source. Go in to the Core Config Manager > Services menu, find that service check and copy it.
Edit the copy and update the Config Name, the Description and make sure it is active.
In the $ARG1$ field, put in the following to monitor the Apache Web server and the example below will generate a warning at 10 processes and a critical at 15, adjust those to your needs.
Any questions, let us know.
It you ran the SSH Proxy wizard, it should of creates a service check called Total Processes.
You can use that one as the source. Go in to the Core Config Manager > Services menu, find that service check and copy it.
Edit the copy and update the Config Name, the Description and make sure it is active.
In the $ARG1$ field, put in the following to monitor the Apache Web server and the example below will generate a warning at 10 processes and a critical at 15, adjust those to your needs.
Code: Select all
/usr/local/nagios/libexec/check_procs -w 10 -c 15 -C httpdBe sure to check out our Knowledgebase for helpful articles and solutions!
Re: Monitor using SSH plugin to monitor Apache service?
@tgriep,
This is very good. It worked for me.
Is there a document that shows how to get all the commands to use for ssh plugin?
I probably need to find out how to track & monitor more services, processes, specific directory sizes, etc.
thanks!
This is very good. It worked for me.
Is there a document that shows how to get all the commands to use for ssh plugin?
I probably need to find out how to track & monitor more services, processes, specific directory sizes, etc.
thanks!
-
kyang
Re: Monitor using SSH plugin to monitor Apache service?
You can pretty much run any command and plugin as long as the client-server has those plugins/commands as well.
For example, on your XI command line the SSH Proxy wizard works like this. This is a plugin example.
The -C means "command to execute on the remote machine"
Except all you are able to see in XI is something like this, when you run the wizard. It's still the same concept.
You can also check commands on linux like
Result
I hope this helps, you can use a plugin to check for services, processes, and specific directory sizes.
Assuming you wanted to do this using the SSH Proxy Wizard and not anything else.
For example, on your XI command line the SSH Proxy wizard works like this. This is a plugin example.
The -C means "command to execute on the remote machine"
Code: Select all
usr/local/nagios/libexec/check_by_ssh -H 192.168.x.xxx -C "/usr/local/nagios/libexec/check_users -w 10 -c 20 /"
Code: Select all
/usr/local/nagios/libexec/check_procs -w 10 -c 15 -C httpdCode: Select all
usr/local/nagios/libexec/check_by_ssh -H 192.168.x.xxx -C whoCode: Select all
root tty1 Sep 27 09:06
root pts/0 Sep 27 09:08 (192.168.x.xxx)
Assuming you wanted to do this using the SSH Proxy Wizard and not anything else.
Re: Monitor using SSH plugin to monitor Apache service?
@ kyang
Thanks for the response. All worked great.
ik
Thanks for the response. All worked great.
ik
-
kyang
Re: Monitor using SSH plugin to monitor Apache service?
Sounds great! I'll be closing this topic as resolved!
If you have any more questions, feel free to create another thread!
Thank you for using the Nagios Support Forum!
If you have any more questions, feel free to create another thread!
Thank you for using the Nagios Support Forum!