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.
liberodark
Posts: 25 Joined: Tue Mar 19, 2019 8:56 am
Post
by liberodark » Tue Jul 02, 2019 10:38 am
Hi,
How to make my plugin compatible with
graph ic ?
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
Need to see on
graph not "Core 0" and "Core 1" but just "Used"
The problem is pipe "|" ?
some server even errors :
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
graph s
Best Regards
scottwilkerson
DevOps Engineer
Posts: 19396 Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Post
by 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%;
liberodark
Posts: 25 Joined: Tue Mar 19, 2019 8:56 am
Post
by 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
cdienger
Support Tech
Posts: 5045 Joined: Tue Feb 07, 2017 11:26 am
Post
by 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 .
liberodark
Posts: 25 Joined: Tue Mar 19, 2019 8:56 am
Post
by 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:
graph 2 work:
You have any idea ?
If you need to see source this is a open source project :
check_cpu :
https://github.com/liberodark/nrpe-inst ... heck_cpu.c
check_mem :
https://github.com/liberodark/nrpe-inst ... heck_mem.c
Best Regards
scottwilkerson
DevOps Engineer
Posts: 19396 Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Post
by 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
liberodark
Posts: 25 Joined: Tue Mar 19, 2019 8:56 am
Post
by liberodark » Wed Aug 14, 2019 7:57 am
Ok thanks im go to see that
scottwilkerson
DevOps Engineer
Posts: 19396 Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Post
by scottwilkerson » Wed Aug 14, 2019 7:59 am
liberodark wrote: Ok thanks im go to see that
sounds good