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.
lmiltchev
Former Nagios Staff
Posts: 13587 Joined: Mon May 23, 2011 12:15 pm
Post
by lmiltchev » Wed Nov 27, 2019 11:13 am
Try wrapping the metric in single quotes:
Code: Select all
check_command check_ncpa!-t myepstoken -P 5693 -M 'plugins/servicescript.sh'
save, exit, and restart nagios:
Make sure nagios restarts (there are no config errors).
Check to see if the output changes.
Be sure to check out our
Knowledgebase for helpful articles and solutions!
lmiltchev
Former Nagios Staff
Posts: 13587 Joined: Mon May 23, 2011 12:15 pm
Post
by lmiltchev » Wed Nov 27, 2019 1:10 pm
Can you zip up the "/usr/local/nagios/etc" directory, and PM me the zip file? We will try to recreate the issue in-house.
Also, PM me the nagios.log, your script, and ncpa.cfg file. Thanks!
Be sure to check out our
Knowledgebase for helpful articles and solutions!
epixelitsupport
Posts: 85 Joined: Fri Nov 08, 2019 2:40 am
Post
by epixelitsupport » Thu Nov 28, 2019 12:54 am
Thanks for your support ... Here I'm attaching what your request for the confirmation and in house testing
Please check your PM
lmiltchev
Former Nagios Staff
Posts: 13587 Joined: Mon May 23, 2011 12:15 pm
Post
by lmiltchev » Mon Dec 02, 2019 11:18 am
I haven't received the files... Can you resend the PM?
Be sure to check out our
Knowledgebase for helpful articles and solutions!
lmiltchev
Former Nagios Staff
Posts: 13587 Joined: Mon May 23, 2011 12:15 pm
Post
by lmiltchev » Mon Dec 02, 2019 1:12 pm
Replied in PM.
Be sure to check out our
Knowledgebase for helpful articles and solutions!
lmiltchev
Former Nagios Staff
Posts: 13587 Joined: Mon May 23, 2011 12:15 pm
Post
by lmiltchev » Mon Dec 02, 2019 2:30 pm
The issue has been resolved in a PM. I will post a solution here in case other users run into the same issue. The problem was caused by non-printable ASCII characters in the output, "black circle" in particular in this case. The issue is described here:
https://github.com/NagiosEnterprises/ncpa/issues/446
We modified the script by piping the output to
tr -cd '\11\12\15\40-\176' in order to strip out the non-printable characters.
Example script:
Code: Select all
#!/bin/bash
systemctl status cmmt_revolution | tr -cd '\11\12\15\40-\176'
I am closing this topic.
Be sure to check out our
Knowledgebase for helpful articles and solutions!