Hello all. I'v been monitoring a device using check_modbus for months, and up until recently is was logging performance data no problem, but now I'm getting a syntax error on the returned value from the check. Here is the error I'm getting:
Ah=10.89843750000000000000 | 10.89843750000000000000 >= 15 : syntax error: invalid arithmetic operator (error token is ".89843750000000000000 <= 14 || 10.89843750000000000000 >= 15 ")]
I haven't made any changes to the service or host during the last few months, and just noticed today that perf data stopped logging in early Dec:/ Any thoughts?
Performance data is not logging for check_modbus anymore
Re: Performance data is not logging for check_modbus anymore
What version of the check_modbus plugin are you running?
Run this command in a shell and post the version number.
If you are not running 0.47, you can download it from this link and update it on your server and see if that fixes the syntax error.
https://github.com/AndreySV/check_modbus
Run this command in a shell and post the version number.
Code: Select all
/usr/local/nagios/libexec/check_modbus --helphttps://github.com/AndreySV/check_modbus
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Performance data is not logging for check_modbus anymore
Thanks for the reply. I looked at the check_modbus version, and I am currently running 0.47:
Check ModBus version 0.47
Build date: 07.04.2017
Check ModBus version 0.47
Build date: 07.04.2017
-
npolovenko
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: Performance data is not logging for check_modbus anymore
@ljblom, If the '>=' sign gets added to the RRD output of this plugin it is not going to be supported by Nagios. Can you open an XI web interface, find the service check and open the advanced tab? I'm interested to see whatever output is next to the "Performance Data" column. Please share it.
If the previous graph history is not so important you could go to /usr/local/nagios/share/perfdata ,find the folder that has the same name as the host, and remove XML and RRD files from it, or at least move them to a different location. Then give nagios 15 min to recreate RRD files.
Ultimately, you could open a new issue on the author's plugin page to see if he has some recommendations:
https://github.com/AndreySV/check_modbus/issues/new
If the previous graph history is not so important you could go to /usr/local/nagios/share/perfdata ,find the folder that has the same name as the host, and remove XML and RRD files from it, or at least move them to a different location. Then give nagios 15 min to recreate RRD files.
Ultimately, you could open a new issue on the author's plugin page to see if he has some recommendations:
https://github.com/AndreySV/check_modbus/issues/new
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Performance data is not logging for check_modbus anymore
You're right, it has to do with that =< syntax error:
A=1.76953125000000000000 | 1.76953125000000000000 >= 15 : syntax error: invalid arithmetic operator (error token is ".76953125000000000000 <= 14 || 1.76953125000000000000 >= 15 ")]
What's got me stumped is I haven't made any changes to the services or device being monitored in months, and it was logging perf data just fine up until Dec 6. The plugin uses -l and -u (lower and upper limit) instead of -w and -c, but again it was working fine for months... Thank you for the continued help!
A=1.76953125000000000000 | 1.76953125000000000000 >= 15 : syntax error: invalid arithmetic operator (error token is ".76953125000000000000 <= 14 || 1.76953125000000000000 >= 15 ")]
What's got me stumped is I haven't made any changes to the services or device being monitored in months, and it was logging perf data just fine up until Dec 6. The plugin uses -l and -u (lower and upper limit) instead of -w and -c, but again it was working fine for months... Thank you for the continued help!
Re: Performance data is not logging for check_modbus anymore
Unfortunately the historical perf data is quite important for this device, as we are currently testing it before we roll it out to our other sites. We need to be able to have access to that perf data.
-
npolovenko
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: Performance data is not logging for check_modbus anymore
@ljblom, I see. I installed this plugin but it is a compiled C code, so it's hard to trace back whats going on. And looking at the code on GitHub I wasn't able to find a line that can produce the >= output. I think asking the author of this plugin about what could produce >= is probably a good idea. He might just be able to come up with a quick patch for this.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Performance data is not logging for check_modbus anymore
OK, I will do that and update this post with any response I get. Thank you for the help, and if you think of anything else, I'm all ears:)
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: Performance data is not logging for check_modbus anymore
If you are unable to get an answer from the developer, we do offer custom development.
Also, have you looked at different plugins? I suppose that doesn't help the perfdata situation, but if this developer is unresponsive, it may be worth stopping to use the plugin now rather than later.
Also, have you looked at different plugins? I suppose that doesn't help the perfdata situation, but if this developer is unresponsive, it may be worth stopping to use the plugin now rather than later.
Re: Performance data is not logging for check_modbus anymore
Got it figured out on our own, woot woot! Not sure what cause the perfdata to be logged, and then not logged without any corresponding config changes though:/ The issue was that the threshold checks were looking for integers, and the check was sending a float. So, we just made the the value that's checked an integer by multiplying both the value and threshold by 10 (so we could still get 1/10 resolution on the threshold comparisons). That did it... Perf data is logging again. Thanks for the tips none the less!