Here is the format of my service check - it is working perfectly EXCEPT I'm having formatting issues with the output and performance data.
The following should report integers in both output and graphing, without any % signs showing up anywhere.
Code: Select all
# libexec/check_nt -H hostname-p 12489 -v COUNTER -l "\\Server\Server Sessions","Server Sessions: %.0f","Users" -w 125 -c 130
Server Sessions: 17 | 'Server Sessions: %.0f'=17.000000%;125.000000;130.000000;
If I don't include the printf formatting "%.0f" then, my graph shows values with 2 decimal positions and confuses people - "how can a fractional part of a license be in use?"
I'd rather not have to format correctly to get integers, but have "%" signs, or not format correctly and get fractional counts in the graph - in either case, I will have to answer questions every time.
Am I missing something? Is there a hidden flag or some printf-fu that will solve this problem? I've spent far too many hours with Google this afternoon.