No output on stdout) stderr: connection refused

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
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: No output on stdout) stderr: connection refused

Post by tgriep »

Commands typically go in to the commands.cfg file.
Be sure to check out our Knowledgebase for helpful articles and solutions!
donnyforbes
Posts: 357
Joined: Tue Jun 13, 2017 2:17 pm

Re: No output on stdout) stderr: connection refused

Post by donnyforbes »

I thought so. I tried this below and it did not work so not sure if it has to go in a different place or not.

Code: Select all

define host{
use linux-box ; Inherit default values from a template
host_name huey  ; The name or IP or remote server
alias RHEL 7.3 ; A longer name for the server
address 192.168.1.42 ; IP address of the remote server
check_ping -H 192.168.1.149 -w 10,2% -c 20,5% -t 5 ; ping to remote hosts
}
When doing this and restarting it would not start backup if failed. Does it go there or somewhere else. Do you have an example of this ???
What I am trying to get accomplished is when a server can't be ping it will send notification, right just trying to get the ping portion setup.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: No output on stdout) stderr: connection refused

Post by dwhitfield »

I apologize if this has already been suggested, but it seems like you could really benefit from Nagios XI. You can download a 60-trial.

There are going to be some changes to the trials, but for now, you can use the free version for up to 7 hosts indefinitely.

There are a number of download options: https://www.nagios.com/downloads/nagios-xi/
donnyforbes
Posts: 357
Joined: Tue Jun 13, 2017 2:17 pm

Re: No output on stdout) stderr: connection refused

Post by donnyforbes »

We do plan on getting XI, however we need to get it working and showing that it will work for our company and its needs that is why I am using the core version now.
I did find this in the commmand.cfg file

Code: Select all

# SAMPLE HOST CHECK COMMANDS
#
################################################################################


# This command checks to see if a host is "alive" by pinging it
# The check must result in a 100% packet loss or 5 second (5000ms) round trip
# average time to produce a critical error.
# Note: Five ICMP echo packets are sent (determined by the '-p 5' argument)

# 'check-host-alive' command definition
define command{
        command_name    check-host-alive
        command_line    $USER1$/check_ping -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 5
        }
I just need to know how to add this for each hosts that I have. We have to be notified when a hosts goes down.
donnyforbes
Posts: 357
Joined: Tue Jun 13, 2017 2:17 pm

Re: No output on stdout) stderr: connection refused

Post by donnyforbes »

I think I figured it out. Thanks for all your help...
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: No output on stdout) stderr: connection refused

Post by dwhitfield »

donnyforbes wrote:We do plan on getting XI, however we need to get it working and showing that it will work for our company and its needs that is why I am using the core version now.
This isn't the best strategy, IMO. If you are interested in XI, start the 60-day trial and show that it works from there. Editing config files in XI is not a thing. You are wasting a lot of time with Core if you plan to move to XI. If you need more than 60-days for a proof of concept, describe your requirements to Sales, and they may grant an extension.
Locked