You are here

Step-by-step for adding plugins

1 post / 0 new
sinny
sinny's picture
Step-by-step for adding plugins

So far I havent gathered quite enough information to form a step by step process for adding an opsview NRPE plugin. 

I am trying to add a plugin to check the age of a file on a windows machine. I have the Opsview client installed on the windows server, other checks are working fine.

Are these the correct steps to follow? (generic)

On the opsview Server:
1 - download plugin and unzip to /usr/local/nagios/libexec

3 - Ensure Nagios is the owner and it is executable
Chown nagios.nagios -R /usr/local/nagios/libexec/check_example_plugin
find /usr/local/nagios/libexec/check_example_plugin -type -f exec chmod a+x {} \;
chown ug+x /usr/local/nagios/libexec/check_example_plugin

4 - in the GUI, Create a new service check and the plugin should appear in the list - Create the check using Check_NRPE then 

check_nrpe -H $HOSTADDRESS$ -c **NRPE_COMMAND** -a '**COMMAND ARGUMENTS**'

NOTE _ There is no need to modify commands.cfg as this is overwritten by opsview upon nagios restart

5 - On the client Windows Machine
Copy the same downloaded plugin to C:\program files\opsview\NSClient++\scripts 
Modify the nsc.ini file to add the local path of the new plugin 
C:\Program Files\opsview\NSClient++\scripts\Check_example_plugin (Do I add the specific arguments here? or do i place $ARG$ at the end and place teh specifics in the service check?)

also - for check_nrpe checks - is it a requiremnt to modify the /usr/local/nagios/configs//Master Monitoring Server/checkcommands.cfg?

If anyone could provide any guidance, or point me towards a workflow or step by step for adding a plugin that would help me? I am new to both linux and opsview and it appears this should be an easy process but in all the posts i read there is so much left out.

Even just a link to a basic plugin that has a good how-to so i can at least get a simple plugin running would be great.