Page 5 of 5

Re: No output on stdout) stderr: connection refused

Posted: Wed Jun 21, 2017 4:21 pm
by tgriep
Commands typically go in to the commands.cfg file.

Re: No output on stdout) stderr: connection refused

Posted: Wed Jun 21, 2017 4:45 pm
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.

Re: No output on stdout) stderr: connection refused

Posted: Wed Jun 21, 2017 4:52 pm
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/

Re: No output on stdout) stderr: connection refused

Posted: Wed Jun 21, 2017 4:57 pm
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.

Re: No output on stdout) stderr: connection refused

Posted: Wed Jun 21, 2017 5:06 pm
by donnyforbes
I think I figured it out. Thanks for all your help...

Re: No output on stdout) stderr: connection refused

Posted: Thu Jun 22, 2017 8:52 am
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.