Issues with command.cfg and ports
-
- Posts: 66
- Joined: Thu Nov 14, 2019 3:31 pm
Re: Issues with command.cfg and ports
Additional
- Attachments
-
- dev_services.cfg
- (2.75 KiB) Downloaded 97 times
-
- dev_service_templates.cfg
- (523 Bytes) Downloaded 102 times
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Issues with command.cfg and ports
Change your check_nt command to
Code: Select all
define command {
command_name check_nt
command_line /usr/lib/nagios/plugins/check_nt -H '$HOSTADDRESS$' -p 12489 -v '$ARG1$' $ARG2$
}
-
- Posts: 66
- Joined: Thu Nov 14, 2019 3:31 pm
Re: Issues with command.cfg and ports
done
root@dalsrvitmon03:/etc/nagios3# cat /etc/nagios-plugins/config/nt.cfg
# If you are confused about this command definition, cause you was
# reading other suggestions, please have a look into
# /usr/share/doc/monitoring-plugins/README.Debian
# 'check_nt' command definition
define command {
command_name check_nt
command_line /usr/lib/nagios/plugins/check_nt -p 12489 -H '$HOSTADDRESS$' -v '$ARG1$' $ARG2$
}
# 'check_nscp' command definition
define command {
command_name check_nscp
command_line /usr/lib/nagios/plugins/check_nt -H '$HOSTADDRESS$' -p 12489 -v '$ARG1$'
}
root@dalsrvitmon03:/etc/nagios3# cat /etc/nagios-plugins/config/nt.cfg
# If you are confused about this command definition, cause you was
# reading other suggestions, please have a look into
# /usr/share/doc/monitoring-plugins/README.Debian
# 'check_nt' command definition
define command {
command_name check_nt
command_line /usr/lib/nagios/plugins/check_nt -p 12489 -H '$HOSTADDRESS$' -v '$ARG1$' $ARG2$
}
# 'check_nscp' command definition
define command {
command_name check_nscp
command_line /usr/lib/nagios/plugins/check_nt -H '$HOSTADDRESS$' -p 12489 -v '$ARG1$'
}
-
- Posts: 66
- Joined: Thu Nov 14, 2019 3:31 pm
Re: Issues with command.cfg and ports
that change made Memory_Usage pop Critical saying
Memory_Usage
Perform Extra Service Actions
CRITICAL 2019-11-14 21:58:49 0d 0h 1m 21s 2/2 connect to address DALSRVITDC01 and port 1248: Connection refused
Memory_Usage
Perform Extra Service Actions
CRITICAL 2019-11-14 21:58:49 0d 0h 1m 21s 2/2 connect to address DALSRVITDC01 and port 1248: Connection refused
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Issues with command.cfg and ports
This must no be using check_nt as I see
and we just specified -p 12489
Code: Select all
port 1248
-
- Posts: 66
- Joined: Thu Nov 14, 2019 3:31 pm
Re: Issues with command.cfg and ports
it would appear so.
here is everything listed under /etc/nagios3/plugins
:/etc/nagios-plugins/config# ls
ajp.cfg check_rabbitmq_aliveness.cfg check_rabbitmq_server.cfg disk.cfg fping.cfg httpd_status.cfg mail.cfg multipath.cfg pgsql.cfg redis.cfg snmp_load.cfg snmp_win.cfg webinject.cfg
apt.cfg check_rabbitmq_connections.cfg check_rabbitmq_shovels.cfg disk-smb.cfg ftp.cfg ifstatus.cfg mailq.cfg mysql.cfg ping.cfg rpc-nfs.cfg snmp_mem.cfg ssh.cfg whois.cfg
bgpstate.cfg check_rabbitmq_objects.cfg check_rabbitmq_watermark.cfg dns.cfg games.cfg ipmi_sensor.cfg memcached.cfg netware.cfg printer.cfg snmp.cfg snmp_process.cfg ssl_cert.cfg zone_auth.cfg
breeze.cfg check_rabbitmq_overview.cfg check_uptime.cfg dummy.cfg haproxy.cfg ldap.cfg mongodb.cfg news.cfg procs.cfg snmp_cpfw.cfg snmp_storage.cfg tcp_udp.cfg zone-rrsig.cfg
check_hp_bladechassis.cfg check_rabbitmq_partition.cfg cups.cfg email_delivery.cfg hppjd.cfg lm_sensors.cfg mrtg.cfg nt.cfg rbl.cfg snmp_env.cfg snmp_time.cfg telnet.cfg
check_nrpe.cfg check_rabbitmq_queue.cfg dhcp.cfg flexlm.cfg http.cfg load.cfg multi.cfg ntp.cfg real.cfg snmp_int.cfg snmp_vrrp.cfg users.cfg
here is everything listed under /etc/nagios3/plugins
:/etc/nagios-plugins/config# ls
ajp.cfg check_rabbitmq_aliveness.cfg check_rabbitmq_server.cfg disk.cfg fping.cfg httpd_status.cfg mail.cfg multipath.cfg pgsql.cfg redis.cfg snmp_load.cfg snmp_win.cfg webinject.cfg
apt.cfg check_rabbitmq_connections.cfg check_rabbitmq_shovels.cfg disk-smb.cfg ftp.cfg ifstatus.cfg mailq.cfg mysql.cfg ping.cfg rpc-nfs.cfg snmp_mem.cfg ssh.cfg whois.cfg
bgpstate.cfg check_rabbitmq_objects.cfg check_rabbitmq_watermark.cfg dns.cfg games.cfg ipmi_sensor.cfg memcached.cfg netware.cfg printer.cfg snmp.cfg snmp_process.cfg ssl_cert.cfg zone_auth.cfg
breeze.cfg check_rabbitmq_overview.cfg check_uptime.cfg dummy.cfg haproxy.cfg ldap.cfg mongodb.cfg news.cfg procs.cfg snmp_cpfw.cfg snmp_storage.cfg tcp_udp.cfg zone-rrsig.cfg
check_hp_bladechassis.cfg check_rabbitmq_partition.cfg cups.cfg email_delivery.cfg hppjd.cfg lm_sensors.cfg mrtg.cfg nt.cfg rbl.cfg snmp_env.cfg snmp_time.cfg telnet.cfg
check_nrpe.cfg check_rabbitmq_queue.cfg dhcp.cfg flexlm.cfg http.cfg load.cfg multi.cfg ntp.cfg real.cfg snmp_int.cfg snmp_vrrp.cfg users.cfg
-
- Posts: 66
- Joined: Thu Nov 14, 2019 3:31 pm
Re: Issues with command.cfg and ports
CPU_Load is also like that as well.
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Issues with command.cfg and ports
I would need to see their actual configs, the list of files is different of every server
-
- Posts: 66
- Joined: Thu Nov 14, 2019 3:31 pm
Re: Issues with command.cfg and ports
I may have found it
on these for testing i put -p 1248 in those, and didnt back it out in my services_nagios2.cfg file
define service{
use production-service
check_period cpuHours
hostgroup_name windows-servers,SQL_Servers,mailservers,oldWindows
service_description CPU_Load
display_name CPU Load
check_command check_nt!CPULOAD!-l 10,90,95
}
define service{
use generic-service
hostgroup_name windows-servers,oldWindows
service_description Memory_Usage
display_name Memory Usage
check_command check_nt!MEMUSE!-w 85 -c 90
}
define service{
use sql-memory-service
hostgroup_name SQL_Servers
service_description SQL_Memory_Usage
display_name SQL Memory Usage
check_command check_nt!MEMUSE!-w 97 -c 99
}
define service{
use generic-service
hostgroup_name mailservers
service_description Memory_Usage
display_name Memory Usage
check_command check_nt!MEMUSE!-w 90 -c 95
on these for testing i put -p 1248 in those, and didnt back it out in my services_nagios2.cfg file
define service{
use production-service
check_period cpuHours
hostgroup_name windows-servers,SQL_Servers,mailservers,oldWindows
service_description CPU_Load
display_name CPU Load
check_command check_nt!CPULOAD!-l 10,90,95
}
define service{
use generic-service
hostgroup_name windows-servers,oldWindows
service_description Memory_Usage
display_name Memory Usage
check_command check_nt!MEMUSE!-w 85 -c 90
}
define service{
use sql-memory-service
hostgroup_name SQL_Servers
service_description SQL_Memory_Usage
display_name SQL Memory Usage
check_command check_nt!MEMUSE!-w 97 -c 99
}
define service{
use generic-service
hostgroup_name mailservers
service_description Memory_Usage
display_name Memory Usage
check_command check_nt!MEMUSE!-w 90 -c 95
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Issues with command.cfg and ports
that could do itkmartin2007 wrote:I may have found it
on these for testing i put -p 1248 in those, and didnt back it out in my services_nagios2.cfg file