Page 1 of 1

Nagios plugin development help from beginning (scretch)

Posted: Sat Aug 20, 2016 12:43 am
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

Re: Nagios plugin development help from beginning (scretch)

Posted: Sat Aug 20, 2016 3:12 pm
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.

Re: Nagios plugin development help from beginning (scretch)

Posted: Tue Aug 23, 2016 12:23 am
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 ?

Re: Nagios plugin development help from beginning (scretch)

Posted: Tue Aug 23, 2016 8:03 am
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.

Re: Nagios plugin development help from beginning (scretch)

Posted: Tue Aug 23, 2016 10:21 am
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.