Option to monitor or check custom made services in Ubuntu

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.
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: Option to monitor or check custom made services in Ubunt

Post by lmiltchev »

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:

Code: Select all

service nagios restart
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!
epixelitsupport
Posts: 85
Joined: Fri Nov 08, 2019 2:40 am

Re: Option to monitor or check custom made services in Ubunt

Post by epixelitsupport »

no Luck , still im getting the same https://prnt.sc/q2xdo8

This is how my service is https://prnt.sc/q2xdo8

No errors after restating the nagios service
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: Option to monitor or check custom made services in Ubunt

Post by lmiltchev »

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

Re: Option to monitor or check custom made services in Ubunt

Post by epixelitsupport »

Thanks for your support ... Here I'm attaching what your request for the confirmation and in house testing

Please check your PM
epixelitsupport
Posts: 85
Joined: Fri Nov 08, 2019 2:40 am

Re: Option to monitor or check custom made services in Ubunt

Post by epixelitsupport »

Hi , have you gone through the files?
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: Option to monitor or check custom made services in Ubunt

Post by lmiltchev »

I haven't received the files... Can you resend the PM?
Be sure to check out our Knowledgebase for helpful articles and solutions!
epixelitsupport
Posts: 85
Joined: Fri Nov 08, 2019 2:40 am

Re: Option to monitor or check custom made services in Ubunt

Post by epixelitsupport »

im just forwarded again via PM.. can you check
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: Option to monitor or check custom made services in Ubunt

Post by lmiltchev »

Replied in PM.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: Option to monitor or check custom made services in Ubunt

Post by lmiltchev »

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!
epixelitsupport
Posts: 85
Joined: Fri Nov 08, 2019 2:40 am

Re: Option to monitor or check custom made services in Ubunt

Post by epixelitsupport »

Now the Issue is even the service has gone Down in the client-server the Nagios server showing it as UP in green colour

In Client Machine service Status: https://prnt.sc/qcdwbh

In Nagios Server Status: https://prnt.sc/qcdwyo

Please check and update me ...
Locked