I've made several check commands that are written in C, they can successfully pass the value (I think they're strings) and are properly shown in Nagios web console.
However, when using Histou to pass value to Grafana for creating graph, they failed.
This doesn't happen when using built-in check_command such as "check_snmp" and "check_ping". So, I wonder what are missing in my code.
Proper ways to create check command
-
- Posts: 3739
- Joined: Thu May 05, 2016 3:54 pm
Re: Proper ways to create check command
Probably missing correctly formatted performance data:
https://nagios-plugins.org/doc/guidelines.html#AEN200
https://nagios-plugins.org/doc/guidelines.html#AEN200
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
-
- Posts: 14
- Joined: Thu Apr 29, 2021 10:23 am
Re: Proper ways to create check command
Hello mcapra,
I haven't added performance data before. After some research, I still get confuse of how to properly include this in the code.
I've checked https://assets.nagios.com/downloads/nag ... fdata.html. Adding the *stroke* doesn't work.
I've tried using the method in https://github.com/nagios-plugins/nagio ... eck_ping.c. Line 174-181; function of "perfdata" can't be used even I've included almost all header (.h) files.
I've also visited https://assets.nagios.com/downloads/nag ... inapi.html. However, I'm still don't have any idea.
I haven't added performance data before. After some research, I still get confuse of how to properly include this in the code.
I've checked https://assets.nagios.com/downloads/nag ... fdata.html. Adding the *stroke* doesn't work.
I've tried using the method in https://github.com/nagios-plugins/nagio ... eck_ping.c. Line 174-181; function of "perfdata" can't be used even I've included almost all header (.h) files.
I've also visited https://assets.nagios.com/downloads/nag ... inapi.html. However, I'm still don't have any idea.
-
- Posts: 14
- Joined: Thu Apr 29, 2021 10:23 am
Re: Proper ways to create check command
Finally, I managed to make performance data works; By referencing a custom check command - "check_eth" which is written in Perl and is available in Nagios Exchange. Thanks to mcapra again for giving me the very useful hint.