Nagios plugin development help from beginning (scretch)

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
santosh.kumar
Posts: 4
Joined: Sat Aug 20, 2016 12:13 am

Nagios plugin development help from beginning (scretch)

Post by santosh.kumar »

Dear Team,

I am beginner developer, I need your support or help to develop nagios plugin from beginning (scretch) level to complete. please help me to developing plugin for nagios.

Thanks & regards
Sk
Thanks & Regards
Sk
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Nagios plugin development help from beginning (scretch)

Post by tmcdonald »

Everything you need to know about Nagios plugin development can be found here:

https://nagios-plugins.org/doc/guidelines.html

If you have questions about plugin output, performance data, or thresholds we would be glad to help. However, please note that this forum is not the proper venue to learn PHP or other languages - for that you will need to find a tutorial or reference manual. We also cannot help each step of the way, but if you are running into issues with the plugin itself (and not the syntax of the language) we can assist.
Former Nagios employee
santosh.kumar
Posts: 4
Joined: Sat Aug 20, 2016 12:13 am

Re: Nagios plugin development help from beginning (scretch)

Post by santosh.kumar »

Dear Sir,

I have query about plugin, Which type (How many types) plugins we can create for nagios. Except verbose output and one line of text based plugins, Can we create digital graph based plugin ?
Thanks & Regards
Sk
santosh.kumar
Posts: 4
Joined: Sat Aug 20, 2016 12:13 am

Re: Nagios plugin development help from beginning (scretch)

Post by santosh.kumar »

Dear Team

I have follow the following link steps to create php based plugin for nagios, In which current status is getting OK but in status infomation disk space value is blank (not visible). please help me to solve this (why php variable value is not visible).
https://www.digitalocean.com/community/ ... n-centos-6

Staus info:-
Current Status: OK (for 4d 0h 28m 37s)
Status Information: OK - / of disk space used.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Nagios plugin development help from beginning (scretch)

Post by tmcdonald »

santosh.kumar wrote:Dear Sir,

I have query about plugin, Which type (How many types) plugins we can create for nagios. Except verbose output and one line of text based plugins, Can we create digital graph based plugin ?
You will want to read the section in the linked guide about Performance Data, which is specially-formatted output used to build graphs.

santosh.kumar wrote:Dear Team

I have follow the following link steps to create php based plugin for nagios, In which current status is getting OK but in status infomation disk space value is blank (not visible). please help me to solve this (why php variable value is not visible).
https://www.digitalocean.com/community/ ... n-centos-6

Staus info:-
Current Status: OK (for 4d 0h 28m 37s)
Status Information: OK - / of disk space used.
Assuming there are no typos in your code from that article, then this variable probably is not being set properly:

$used_space=chop(shell_exec("df -h / | grep -v Filesystem | awk '{print $5}'"));

It is possible that the df output is failing, or grep is not finding anything, or the input to awk is empty as a result. This is something you will need to troubleshoot however - assistance with any specific language is not in scope for this forum. We can assist with making sure your output and exit codes are proper, but the specifics of how those are determined are up to you.
Former Nagios employee
Locked