My Plugins Compatible with Graphic

This forum is intended for the discussion of Nagios plugin development. Feature requests, patches, bug fixes, and all types of development-related discussions are welcome!

NOTE: The SourceForge.net nagiosplug-devel mailing list has been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

My Plugins Compatible with Graphic

Postby liberodark » Tue Jul 02, 2019 10:38 am

Hi,

How to make my plugin compatible with graphic ?

That is shell see
Code: Select all
./check_cpu -w 70 -c 90
CPU OK - Used = 0.00% | Core 0 = 0.00%; Core 1 = 0.99%

But for me just work OK / Warning / Critical but Graph no work :(

Image

Need to see on graph not "Core 0" and "Core 1" but just "Used"
The problem is pipe "|" ?

some server even errors :

Image

Have other same plugin :

Code: Select all
./check_mem -w 70 -c 90
MEMORY Warning - Used = 82.64% | Total: 3756 MB Used: 3104 MB Free: 652 MB


But for this not have any informations on graphs :(

Best Regards
liberodark
 
Posts: 25
Joined: Tue Mar 19, 2019 8:56 am

Re: My Plugins Compatible with Graphic

Postby scottwilkerson » Tue Jul 02, 2019 12:58 pm

The performace data need to be in a very specific format and you have some extra spaces in there.

See the performance data section here
https://nagios-plugins.org/doc/guidelines.html#AEN200

Specifically, if you plugin returned output like this it would succeed
Code: Select all
./check_cpu -w 70 -c 90
CPU OK - Used = 0.00% |'Core 0'=0.00%; 'Core 1'=0.99%;
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 17024
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: My Plugins Compatible with Graphic

Postby liberodark » Wed Jul 03, 2019 3:03 pm

Hi thanks and for

Code: Select all
./check_mem -w 70 -c 90
MEMORY Warning - Used = 82.64% | Total: 3756 MB Used: 3104 MB Free: 652 MB


Is

Code: Select all
./check_mem -w 70 -c 90
MEMORY Warning - Used = 82.64% | Total: '3756' MB Used: '3104' MB Free: '652' MB


?

Best Regards
liberodark
 
Posts: 25
Joined: Tue Mar 19, 2019 8:56 am

Re: My Plugins Compatible with Graphic

Postby cdienger » Wed Jul 03, 2019 4:37 pm

Change:

Code: Select all
./check_mem -w 70 -c 90
MEMORY Warning - Used = 82.64% | Total: 3756 MB Used: 3104 MB Free: 652 MB



To:
Code: Select all
./check_mem -w 70 -c 90
MEMORY Warning - Used = 82.64% | 'Total'=3756MB 'Used'=3104MB 'Free'=652MB
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
cdienger
Support Tech
 
Posts: 3775
Joined: Tue Feb 07, 2017 11:26 am

Re: My Plugins Compatible with Graphic

Postby liberodark » Fri Jul 05, 2019 9:13 am

Hi,

Thanks for reply have fix cpu and memory but memory is not work :

CPU work on all graph :
Code: Select all
check_cpu -w 70 -c 90
CPU OK - Used = 1.00% |'Core 0'=1.00%;


Memory not work on graph 1 but work on graph 2 :
Code: Select all
check_mem -w 70 -c 90
MEMORY OK - Used = 49.27% | 'Total'=1838MB 'Used'=906MB 'Free'=932MB


Graph 1 not work:
Image

Graph 2 work:
Image

You have any idea ?

If you need to see source this is a open source project :

check_cpu : https://github.com/liberodark/nrpe-installer/blob/master/src/check_cpu.c
check_mem : https://github.com/liberodark/nrpe-installer/blob/master/src/check_mem.c

Best Regards
liberodark
 
Posts: 25
Joined: Tue Mar 19, 2019 8:56 am

Re: My Plugins Compatible with Graphic

Postby scottwilkerson » Tue Jul 09, 2019 7:08 am

The Graph you are showing only has one datasource and your plugin is now returning 3, if the plugin changed after the rrd file was created you will need to delete the rrd and it should get re-created
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 17024
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: My Plugins Compatible with Graphic

Postby liberodark » Wed Aug 14, 2019 7:57 am

Ok thanks im go to see that
liberodark
 
Posts: 25
Joined: Tue Mar 19, 2019 8:56 am

Re: My Plugins Compatible with Graphic

Postby scottwilkerson » Wed Aug 14, 2019 7:59 am

liberodark wrote:Ok thanks im go to see that

sounds good
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 17024
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises


Return to Nagios Plugin Development

Who is online

Users browsing this forum: No registered users and 1 guest