Hi everyone!
I have a problem detecting ssh service on a host with multiple ips.
Host with sshd is CentOS 5.5 and has two ips, 1 public and 1 private.
Agent zabbix is only listening on private one.
When I configure sshd (/etc/ssh/sshd_config) to listen only on private ip Zabbix server detects ssh service is down (item is configured as "ZABBIX agent"), however, if I configure sshd to listen on all intertaces, zabbix server works fine.
It's very strange because host with zabbix server (Fedora 12) is not connected to public network.
zabbix_agentd.conf below.
Thanks in advance
Casiano
# This is config file for zabbix_agentd
# To get more information about ZABBIX, go http://www.zabbix.com
############ GENERAL PARAMETERS #################
# List of comma delimited IP addresses (or hostnames) of ZABBIX servers.
# No spaces allowed. First entry is used for sending active checks.
# Note that hostnames must resolve hostname->IP address and
# IP address->hostname.
Server=private_ip_server
# Server port for sending active checks
#ServerPort=10051
# Unique hostname. Required for active checks.
Hostname=test1
# Listen port. Default is 10050
#ListenPort=10050
# IP address to bind agent
# If missing, bind to all available IPs
ListenIP=private_ip
# Source IP address for outgouing connections
#SourceIP=
# Number of pre-forked instances of zabbix_agentd,
# which process passive checks.
# Default value is 3.
# This parameter must be between 1 and 16.
StartAgents=12
# How often refresh list of active checks.
# Default value is 120 seconds.
# This parameter must be between 60 and 3600.
#RefreshActiveChecks=120
# Disable active checks. The agent will work in passive mode listening server.
#DisableActive=1
# Disable passive checks. The agent will not listen to any TCP ports.
# Only active checks will be processed.
#DisablePassive=1
# Enable remote commands for ZABBIX agent. By default remote commands disabled.
EnableRemoteCommands=1
# Specifies debug level
# 0 - debug is not created
# 1 - critical information
# 2 - error information
# 3 - warnings (default)
# 4 - for debugging (produces lots of information)
DebugLevel=3
# Name of PID file
PidFile=/var/run/zabbix/zabbix_agentd.pid
# Name of log file.
# If not set, syslog will be used
LogFile=/var/log/zabbix/zabbix_agentd.log
# Maximum size of log file in MB. Set to 0 to disable automatic log rotation.
LogFileSize=2
# Spend no more than Timeout seconds on processing
# Must be between 1 and 30
Timeout=30
####### USER-DEFINED MONITORED PARAMETERS #######
# Format: UserParameter=<key>,<shell command>
# Note that shell command must not return empty string or EOL only
#UserParameter=system.test,who|wc -l
### Set of parameter for monitoring MySQL server (v3.23.42 and later)
### Change -u<username> and add -p<password> if required
### Descomentar estas lineas para usar la plantilla Aplicacion_Zabbix
UserParameter=zabbix.agent.mem,ps aux | grep zabbix_agentd | grep -v grep| awk '{s+=$4} END {print s}'
UserParameter=zabbix.agent.cpu,ps aux | grep zabbix_agentd | grep -v grep| awk '{s+=$3} END {print s}'
UserParameter=zabbix.server.mem,ps aux | grep zabbix_server | grep -v grep| awk '{s+=$4} END {print s}'
UserParameter=zabbix.server.cpu,ps aux | grep zabbix_server | grep -v grep| awk '{s+=$3} END {print s}'
I have a problem detecting ssh service on a host with multiple ips.
Host with sshd is CentOS 5.5 and has two ips, 1 public and 1 private.
Agent zabbix is only listening on private one.
When I configure sshd (/etc/ssh/sshd_config) to listen only on private ip Zabbix server detects ssh service is down (item is configured as "ZABBIX agent"), however, if I configure sshd to listen on all intertaces, zabbix server works fine.
It's very strange because host with zabbix server (Fedora 12) is not connected to public network.
zabbix_agentd.conf below.
Thanks in advance
Casiano
# This is config file for zabbix_agentd
# To get more information about ZABBIX, go http://www.zabbix.com
############ GENERAL PARAMETERS #################
# List of comma delimited IP addresses (or hostnames) of ZABBIX servers.
# No spaces allowed. First entry is used for sending active checks.
# Note that hostnames must resolve hostname->IP address and
# IP address->hostname.
Server=private_ip_server
# Server port for sending active checks
#ServerPort=10051
# Unique hostname. Required for active checks.
Hostname=test1
# Listen port. Default is 10050
#ListenPort=10050
# IP address to bind agent
# If missing, bind to all available IPs
ListenIP=private_ip
# Source IP address for outgouing connections
#SourceIP=
# Number of pre-forked instances of zabbix_agentd,
# which process passive checks.
# Default value is 3.
# This parameter must be between 1 and 16.
StartAgents=12
# How often refresh list of active checks.
# Default value is 120 seconds.
# This parameter must be between 60 and 3600.
#RefreshActiveChecks=120
# Disable active checks. The agent will work in passive mode listening server.
#DisableActive=1
# Disable passive checks. The agent will not listen to any TCP ports.
# Only active checks will be processed.
#DisablePassive=1
# Enable remote commands for ZABBIX agent. By default remote commands disabled.
EnableRemoteCommands=1
# Specifies debug level
# 0 - debug is not created
# 1 - critical information
# 2 - error information
# 3 - warnings (default)
# 4 - for debugging (produces lots of information)
DebugLevel=3
# Name of PID file
PidFile=/var/run/zabbix/zabbix_agentd.pid
# Name of log file.
# If not set, syslog will be used
LogFile=/var/log/zabbix/zabbix_agentd.log
# Maximum size of log file in MB. Set to 0 to disable automatic log rotation.
LogFileSize=2
# Spend no more than Timeout seconds on processing
# Must be between 1 and 30
Timeout=30
####### USER-DEFINED MONITORED PARAMETERS #######
# Format: UserParameter=<key>,<shell command>
# Note that shell command must not return empty string or EOL only
#UserParameter=system.test,who|wc -l
### Set of parameter for monitoring MySQL server (v3.23.42 and later)
### Change -u<username> and add -p<password> if required
### Descomentar estas lineas para usar la plantilla Aplicacion_Zabbix
UserParameter=zabbix.agent.mem,ps aux | grep zabbix_agentd | grep -v grep| awk '{s+=$4} END {print s}'
UserParameter=zabbix.agent.cpu,ps aux | grep zabbix_agentd | grep -v grep| awk '{s+=$3} END {print s}'
UserParameter=zabbix.server.mem,ps aux | grep zabbix_server | grep -v grep| awk '{s+=$4} END {print s}'
UserParameter=zabbix.server.cpu,ps aux | grep zabbix_server | grep -v grep| awk '{s+=$3} END {print s}'
Comment