Hi Team,
I have added a linux server and under it i have added few partition after adding these partitions while i am restart the nagios .I am getting 8 errors but i am unable to identify where it is. Please find the attached screenshot for reference and help me in fixing this.
Nagios NRPE Concern
Re: Nagios NRPE Concern
I think there may be some syntax errors with your check_command directives for the services you defined. Here are some from my lab machine:
Can you share some of the recently added configuration objects for review? Ideally, by using something like WinSCP or FileZilla to physically download the specific configuration files from the machine and upload it here directly. If that's not possible, we can start with a simple copy+paste.
Code: Select all
define service{
use elasticsearch-prod
hostgroup_name esprod
service_description CPU Usage
check_command check_elasticsearch!checkcpu!-w 80 -c 90
}
define service{
use elasticsearch-prod
hostgroup_name esprod
service_description Memory Usage
check_command check_elasticsearch!checkmem!-w 80 -c 90
}
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
Re: Nagios NRPE Concern
Thanks for the assist, @mcapra! OP, let us know if you need further assistance.
Former Nagios employee
Re: Nagios NRPE Concern
Code: Select all
###############################################################################
# LOCALHOST.CFG - SAMPLE OBJECT CONFIG FILE FOR MONITORING THIS MACHINE
#
#
# NOTE: This config file is intended to serve as an *extremely* simple
# example of how you can create configuration entries to monitor
# the local (Linux) machine.
#
###############################################################################
###############################################################################
###############################################################################
#
# HOST DEFINITION
#
###############################################################################
###############################################################################
# Define a host for the local machine
define host{
use linux-server ; Name of host template to use
; This host definition will inherit all variables that are defined
; in (or inherited by) the linux-server host template definition.
host_name xxx.xx.xx.xx-XX-XXX-XXX
alias xxx.xx.xx.xx-XXXX-XXX-XXXXX-XXXX
address xxx.xx.xx.xx
}
###############################################################################
###############################################################################
#
# HOST GROUP DEFINITION
#
###############################################################################
###############################################################################
# Define an optional hostgroup for Linux machines
###############################################################################
###############################################################################
#
# SERVICE DEFINITIONS
#
###############################################################################
###############################################################################
# Define a service to "ping" the local machine
define service{
use local-service ; Name of service template to use
host_name xxx.xx.xx.xx-XX-XXX-XXX
service_description PING
check_command check_ping!100.0,20%!500.0,60%
servicegroups xxxxxxxx
}
# Define a service to check the disk space of the root partition
# on the local machine. Warning if < 20% free, critical if
# < 10% free space on partition.
#define service{
# use local-service ; Name of service template to use
# host_name xxx.xx.xx.xx-XX-XXX-XXX
# service_description /root
# check_command check_nrpe!check_root
# servicegroups xxxxxxxx
# }
#define service{
# use local-service ; Name of service template to use
# host_name xxx.xx.xx.xx-XX-XXX-XXX
# service_description /home
# check_command check_nrpe!check_home
# servicegroups xxxxxxxx
# }
#define service{
# use local-service ; Name of service template to use
# host_name xxx.xx.xx.xx-XX-XXX-XXX
# service_description /boot
# check_command check_nrpe!check_boot
# servicegroups xxxxxxxx
# }
#define service{
# use local-service ; Name of service template to use
# host_name xxx.xx.xx.xx-XX-XXX-XXX
# service_description /mlogserverj
# check_command check_nrpe!check_mlogserverj
# servicegroups xxxxxxxx
# }
#define service{
# use local-service ; Name of service template to use
# host_name xxx.xx.xx.xx-XX-XXX-XXX
# service_description /dev/shm
# check_command check_nrpe!check_dev_shm
# servicegroups xxxxxxxx
# }
#define service{
# use local-service ; Name of service template to use
# host_name xxx.xx.xx.xx-XX-XXX-XXX
# service_description /backup
# check_command check_nrpe!check_backup
# servicegroups xxxxxxxx
# }
#define service{
# use local-service ; Name of service template to use
# host_name xxx.xx.xx.xx-XX-XXX-XXX
# service_description /usr
# check_command check_nrpe!check_home!90%!95%!/home
# servicegroups xxxxxxxx
# }
#define service{
# use local-service ; Name of service template to use
# host_name xxx.xx.xx.xx-XX-XXX-XXX
# service_description /var
# check_command check_nrpe!check_home!90%!95%!/home
# servicegroups xxxxxxxx
# }
# Define a service to check the number of currently logged in
# users on the local machine. Warning if > 20 users, critical
# if > 50 users.
#define service{
# use local-service ; Name of service template to use
# host_name xxx.xx.xx.xx-XX-XXX-XXX
# service_description Current Users
# check_command check_nrpe!check_users!20!50
# servicegroups xxxxxxxx
# }
# Define a service to check the number of currently running procs
# on the local machine. Warning if > 250 processes, critical if
# > 400 processes.
#define service{
# use local-service ; Name of service template to use
# host_name xxx.xx.xx.xx-XX-XXX-XXX
# service_description Total Processes
# check_command check_nrpe!check_total_procs!250!400!RSZDT
# servicegroups xxxxxxxx
# }
# Define a service to check the load on the local machine.
#define service{
# use local-service ; Name of service template to use
# host_name xxx.xx.xx.xx-XX-XXX-XXX
# service_description CPU Load
# check_command check_nrpe!check_load!5.0,4.0,3.0!10.0,6.0,4.0
# servicegroups xxxxxxxx
# }
# Define a service to check the swap usage the local machine.
# Critical if less than 10% of swap is free, warning if less than 20% is free
#define service{
# use local-service ; Name of service template to use
# host_name xxx.xx.xx.xx-XX-XXX-XXX
# service_description Swap Usage
# check_command check_nrpe!check_swap!20!10
# servicegroups xxxxxxxx
# }
# Define a service to check SSH on the local machine.
# Disable notifications for this service by default, as not all users may have SSH enabled.
#define service{
# use local-service ; Name of service template to use
# host_name xxx.xx.xx.xx-XX-XXX-XXX
# service_description SSH
# check_command check_nrpe!check_ssh
# notifications_enabled 1
# servicegroups xxxxxxxx
# }
# Define a service to check HTTP on the local machine.
# Disable notifications for this service by default, as not all users may have HTTP enabled.
#define service{
# use generic-service
# host_name xxx.xx.xx.xx-XX-XXX-XXX
# service_description Memory Usage
# check_command check_nrpe!check_mem
# servicegroups xxxxxxxx
# }
above is the file which i have added and the problem is coming when is add the partition details. kindly help in fixing this
Last edited by tmcdonald on Mon Aug 07, 2017 9:17 am, edited 1 time in total.
Reason: Please use [code][/code] tags around long output
Reason: Please use [code][/code] tags around long output
Re: Nagios NRPE Concern
It looks like you could be missing the check_nrpe command that should be defined in the commands.cfg file.
Add the following command in there and see if that files it for you.
If you have any new errors, post them here.
Add the following command in there and see if that files it for you.
Code: Select all
define command {
command_name check_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ $ARG2$
}
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Nagios NRPE Concern
After adding this we have received below error
Error: CHECK_NRPE: Error - Could not connect to IPaddres: Connection reset by peer
and i just added -n before -c which is called as secured and then the issue got fixed
Below is the changes done
define command {
command_name check_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -n -c $ARG1$ $ARG2$
}
Youc can close this topic
Error: CHECK_NRPE: Error - Could not connect to IPaddres: Connection reset by peer
and i just added -n before -c which is called as secured and then the issue got fixed
Below is the changes done
define command {
command_name check_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -n -c $ARG1$ $ARG2$
}
Youc can close this topic
Re: Nagios NRPE Concern
Closing topic as resolved.
Thank you for using the Nagios Support Forum.
Thank you for using the Nagios Support Forum.