Page 1 of 1

CUSTOM plugins fro XI monitoring

Posted: Wed Nov 10, 2021 11:25 am
by ITOMB_IMT
Hi,

I have some questions regarding custom plugins. Earlier we used write a custom plugin for monitoring purpose and store it in /usr/lib/libexec on remote server and configure it in nrpe.cfg.
1. can we store the custom plugin on nagios server and monitor? if so what type of access is required by nagios user on remote server.
2. How to configure custom plugin for monitoring from Nagios server?

Re: CUSTOM plugins fro XI monitoring

Posted: Thu Nov 11, 2021 11:46 am
by kfanselow
Hi TOMB_IMT,

The answers to these questions will depend upon the nature of the system, script and what it is checking. Generally speaking with most UNIX/Unix Like systems a lot of things can be checked in more than one way such as SNMP or using a plugin such as 'check_by_ssh'. What type of script is it and what are you checking ?

Also - for convenience sake here is some of our documentation that you might find useful:

Plugin API page:
https://assets.nagios.com/downloads/nag ... inapi.html

Plugin Development Guidelines:
http://nagios-plugins.org/doc/guidelines.html

And the Manual Page for check_by_ssh:
https://nagios-plugins.org/doc/man/check_by_ssh.html

Thanks and Best Regards,
Keith

Re: CUSTOM plugins fro XI monitoring

Posted: Thu Nov 11, 2021 4:14 pm
by ITOMB_IMT
Thanks for your response. Currently i have custom scripts written and stored in remote server. They were configured in nrpe.cfg file and providing desired results.

Let me say for example, i have check_disk plugin stored and configured in nrpe.cfg file on remote server and the service is defined as follows in nagios server.

define service {
host_name remote_server
service_description / Disk Usage
use xiwizard_nrpe_service
check_command check_nrpe!check_disk!-a '-w 15% -c 10% -p /'!!!!!!
initial_state o
max_check_attempts 1
check_interval 5
retry_interval 1
active_checks_enabled 1
check_period xi_timeperiod_24x7
notification_interval 10
notification_period xi_timeperiod_24x7
notification_options w,c,u,r,
notifications_enabled 1
contacts nagiosadmin
_xiwizard linux-server
register 1
}

I don't want the plugin to be stored on remote server and to be configured in remote server. as we are planning to add more and more servers, its difficult to copy plugins and configure in nrpe.cfg file on all servers.

I just want to store the plugins stored on nagios server instead of remote server and start monitoring. Please let me know if there is a way.

Thanks,

Re: CUSTOM plugins fro XI monitoring

Posted: Fri Nov 12, 2021 11:23 am
by ssax
It's not possible with NRPE, you can do centralized config/plugin management with with NRDS though:

https://assets.nagios.com/downloads/nag ... h_NRDS.pdf

If you needed it for NRPE you'd need to use a solution such as ansible or some other config management solution.

Re: CUSTOM plugins fro XI monitoring

Posted: Fri Nov 12, 2021 12:04 pm
by kfanselow
Hi ITOMB_IMT,

I see you're using NRPE currently and we are working to move customers to NCPA where practical to both for ease of management and because NCPA is going to our supported agent moving foward. NCPA can be installed and managed through the XI console (Configure -> Deploy Agent) which makes it easier to use however if you want to avoid using an agent all together you can use SNMP or run commands on the remote system using plugins like check_by_ssh.

Here's our knowledge base article on monitoring Linux based system using SNMP:
https://assets.nagios.com/downloads/nag ... g-SNMP.pdf

Also here is the manual page for our check_by_ssh plugin:
https://nagios-plugins.org/doc/man/check_by_ssh.html

Hope this is useful,

Thanks and Best Regards,
Keith

Re: CUSTOM plugins fro XI monitoring

Posted: Fri Nov 12, 2021 1:30 pm
by ITOMB_IMT
hi,

Thanks for your response on doing to through NRDS for Linux servers. How can i do it with NCPA for windows servers?

Thanks,

Re: CUSTOM plugins fro XI monitoring

Posted: Mon Nov 15, 2021 11:25 am
by ssax
NCPA doesn't currently support it.

NRDS (for Windows and Linux) is currently the only method that allows centralized config/plugin management.