Page 1 of 1
My Plugins Compatible with Graphic
Posted: Tue Jul 02, 2019 10:38 am
by liberodark
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
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 graphs
Best Regards
Re: My Plugins Compatible with Graphic
Posted: Tue Jul 02, 2019 12:58 pm
by scottwilkerson
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%;
Re: My Plugins Compatible with Graphic
Posted: Wed Jul 03, 2019 3:03 pm
by liberodark
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
Re: My Plugins Compatible with Graphic
Posted: Wed Jul 03, 2019 4:37 pm
by cdienger
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
Re: My Plugins Compatible with Graphic
Posted: Fri Jul 05, 2019 9:13 am
by liberodark
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
Re: My Plugins Compatible with Graphic
Posted: Tue Jul 09, 2019 7:08 am
by scottwilkerson
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
Re: My Plugins Compatible with Graphic
Posted: Wed Aug 14, 2019 7:57 am
by liberodark
Ok thanks im go to see that
Re: My Plugins Compatible with Graphic
Posted: Wed Aug 14, 2019 7:59 am
by scottwilkerson
liberodark wrote:Ok thanks im go to see that
sounds good