2006-11-23 17:40:28 +01:00
|
|
|
# Base config file for Pandora FMS agents
|
|
|
|
# Version 1.2
|
2007-01-03 19:47:54 +01:00
|
|
|
# Licensed under GPL license v2,
|
|
|
|
# (c) 2003-2007 Sancho Lerena and others.
|
|
|
|
# please visit http://pandora.sourceforge.net
|
2006-03-27 05:37:27 +02:00
|
|
|
|
|
|
|
# General Parameters
|
|
|
|
# ==================
|
|
|
|
|
2007-01-03 19:47:54 +01:00
|
|
|
server_ip 192.168.50.1
|
2007-04-11 16:14:32 +02:00
|
|
|
server_path /var/spool/pandora/data_in
|
2007-04-19 20:37:57 +02:00
|
|
|
temporal /tmp
|
2007-01-03 19:47:54 +01:00
|
|
|
logfile /var/log/pandora_agent.log
|
|
|
|
|
|
|
|
# Interval in seconds, 300 by default
|
2006-07-06 19:17:49 +02:00
|
|
|
interval 300
|
2007-01-03 19:47:54 +01:00
|
|
|
|
|
|
|
# Debug mode only generate XML, and stop after first execution,
|
|
|
|
# and does not copy XML to server.
|
2006-07-06 19:17:49 +02:00
|
|
|
debug 0
|
2007-01-03 19:47:54 +01:00
|
|
|
|
|
|
|
# By default is activated
|
2006-07-06 19:17:49 +02:00
|
|
|
checksum 0
|
2007-01-03 19:47:54 +01:00
|
|
|
|
|
|
|
# By default, agent takes machine name
|
|
|
|
#agent_name adama
|
|
|
|
|
|
|
|
# By default agent try to take default encoding defined in host.
|
|
|
|
# encoding iso-8859-15
|
|
|
|
|
2007-04-21 22:05:35 +02:00
|
|
|
# By default is 22 (for ssh)
|
2007-01-03 19:47:54 +01:00
|
|
|
#server_port 22
|
2006-03-27 05:37:27 +02:00
|
|
|
|
2007-04-21 22:05:35 +02:00
|
|
|
# ftp, ssh or local
|
|
|
|
transfer_mode ssh
|
|
|
|
|
2007-06-12 11:32:54 +02:00
|
|
|
# delayed_startup defines number of MINUTES before start execution
|
|
|
|
# for first time when startup Pandora Agent
|
|
|
|
|
2007-06-14 17:27:04 +02:00
|
|
|
#delayed_startup 90
|
2007-06-12 11:32:54 +02:00
|
|
|
|
|
|
|
#Pandora nice defines priority of execution. Less priority means more intensive execution
|
|
|
|
#A recommended value is 10. 0 priority means no Pandora CPU protection enabled
|
2007-06-25 13:23:43 +02:00
|
|
|
#pandora_nice 0
|
2007-06-12 11:32:54 +02:00
|
|
|
|
|
|
|
|
2006-03-27 05:37:27 +02:00
|
|
|
# Module Definition
|
|
|
|
# =================
|
|
|
|
|
2007-01-03 19:47:54 +01:00
|
|
|
# System information
|
|
|
|
|
2006-03-27 05:37:27 +02:00
|
|
|
# vmstat syntax depends on linux distro and vmstat command version, please check before use it
|
|
|
|
module_begin
|
|
|
|
module_name cpu_user
|
|
|
|
module_type generic_data
|
2006-06-05 22:52:12 +02:00
|
|
|
module_interval 1
|
2006-11-23 17:40:28 +01:00
|
|
|
module_exec vmstat 1 2 | tail -1 | awk '{ print $13 }'
|
2006-03-27 05:37:27 +02:00
|
|
|
module_max 100
|
|
|
|
module_min 0
|
|
|
|
module_descripcion User CPU Usage (%)
|
|
|
|
module_end
|
|
|
|
|
|
|
|
module_begin
|
|
|
|
module_name cpu_sys
|
|
|
|
module_type generic_data
|
2006-11-23 17:40:28 +01:00
|
|
|
module_exec vmstat 1 2 | tail -1 | awk '{ print $14 }'
|
2006-03-27 05:37:27 +02:00
|
|
|
module_max 100
|
|
|
|
module_min 0
|
|
|
|
module_description System CPU Usage (%)
|
|
|
|
module_end
|
|
|
|
|
|
|
|
module_begin
|
|
|
|
module_name disk_root_free
|
|
|
|
module_type generic_data
|
|
|
|
module_exec df -kh / | tail -1 | awk '{ print 100-$5 }'
|
|
|
|
module_max 100
|
|
|
|
module_min 0
|
|
|
|
module_description Free disk Percentage of root partition
|
|
|
|
module_end
|
|
|
|
|
2007-04-22 02:59:44 +02:00
|
|
|
|
|
|
|
module_begin
|
|
|
|
module_name disk_var_free
|
|
|
|
module_type generic_data
|
|
|
|
module_exec df -kh /var | tail -1 | awk '{ print 100-$5 }'
|
|
|
|
module_max 100
|
|
|
|
module_min 0
|
|
|
|
module_description Free disk Percentage of var partition
|
|
|
|
module_end
|
|
|
|
|
2006-03-27 05:37:27 +02:00
|
|
|
module_begin
|
|
|
|
module_name memfree
|
|
|
|
module_type generic_data
|
2006-07-06 19:17:49 +02:00
|
|
|
module_exec cat /proc/meminfo | grep MemFree | awk '{ print $2 }'
|
2006-03-27 05:37:27 +02:00
|
|
|
module_end
|
|
|
|
|
|
|
|
module_begin
|
|
|
|
module_name memused
|
|
|
|
module_type generic_data
|
2006-07-06 19:17:49 +02:00
|
|
|
module_exec cat /proc/meminfo | grep "Active" | awk '{ print $2 }'
|
2006-03-27 05:37:27 +02:00
|
|
|
module_end
|
|
|
|
|
|
|
|
module_begin
|
|
|
|
module_name proctotal
|
|
|
|
module_type generic_data
|
|
|
|
module_exec ps -A | wc -l
|
|
|
|
module_end
|
|
|
|
|
2007-01-03 19:47:54 +01:00
|
|
|
# Process information
|
|
|
|
|
2006-03-27 05:37:27 +02:00
|
|
|
module_begin
|
|
|
|
module_name apache
|
|
|
|
module_type generic_proc
|
|
|
|
module_exec ps -Af | grep apache | grep -v "grep" | wc -l
|
|
|
|
module_end
|
|
|
|
|
|
|
|
module_begin
|
|
|
|
module_name sshDaemon
|
|
|
|
module_type generic_proc
|
|
|
|
module_exec ps -Af | grep sshd | grep -v "grep" | wc -l
|
|
|
|
module_end
|
|
|
|
|
2007-01-03 19:47:54 +01:00
|
|
|
# Informational stuff
|
|
|
|
|
2006-03-27 05:37:27 +02:00
|
|
|
module_begin
|
2006-06-05 22:52:12 +02:00
|
|
|
module_name last_syslog
|
2006-03-27 05:37:27 +02:00
|
|
|
module_type generic_data_string
|
2006-06-05 22:52:12 +02:00
|
|
|
module_exec tail -1 /var/log/syslog
|
2007-01-03 19:47:54 +01:00
|
|
|
module_description Last line of syslog
|
2006-03-27 05:37:27 +02:00
|
|
|
module_end
|
|
|
|
|
|
|
|
module_begin
|
2007-01-03 19:47:54 +01:00
|
|
|
module_name last_login
|
|
|
|
module_type generic_data_string
|
|
|
|
module_exec last | head -1
|
|
|
|
module_description Last connected to system
|
2006-03-27 05:37:27 +02:00
|
|
|
module_end
|
|
|
|
|
2007-01-03 19:47:54 +01:00
|
|
|
|
|
|
|
# Networking
|
|
|
|
|
2006-03-27 05:37:27 +02:00
|
|
|
module_begin
|
2007-01-03 19:47:54 +01:00
|
|
|
module_name incoming_pkt
|
|
|
|
module_type generic_data_inc
|
|
|
|
module_exec netstat -as | grep "incoming packets delivered" | awk '{ print $1 }'
|
|
|
|
module_description Incoming packets arriving to system
|
|
|
|
module_end
|
|
|
|
|
|
|
|
module_begin
|
|
|
|
module_name outbound_pkt
|
|
|
|
module_type generic_data_inc
|
|
|
|
module_exec netstat -as | grep "requests sent out" | awk '{ print $1 }'
|
|
|
|
module_description Outbound Packets sent by system
|
|
|
|
module_end
|
|
|
|
|
|
|
|
module_begin
|
|
|
|
module_name conn_resets
|
|
|
|
module_type generic_data_inc
|
|
|
|
module_exec netstat -as | grep "connections reset due to unexpected SYN" | awk '{ print $1 }'
|
|
|
|
module_description Resets due to unexpected SYN
|
2006-03-27 05:37:27 +02:00
|
|
|
module_end
|
|
|
|
|
2007-04-19 20:37:57 +02:00
|
|
|
module_begin
|
|
|
|
module_name PandoraNetwork_RAM
|
|
|
|
module_exec ps aux | grep pandora_network | head -1 | awk '{ print $6 }'
|
|
|
|
module_type generic_data
|
|
|
|
module_end
|
|
|
|
|
|
|
|
module_begin
|
|
|
|
module_name PandoraNetwork_CPU
|
|
|
|
module_exec ps aux | grep pandora_network | head -1 | awk '{print $3}'
|
|
|
|
module_type generic_data
|
|
|
|
module_end
|
|
|
|
|
|
|
|
module_begin
|
|
|
|
module_name PandoraDS_RAM
|
|
|
|
module_exec ps aux | grep pandora_server | head -1 | awk '{ print $6 }'
|
|
|
|
module_type generic_data
|
|
|
|
module_end
|
|
|
|
|
|
|
|
module_begin
|
|
|
|
module_name PandoraDS_CPU
|
|
|
|
module_exec ps aux | grep pandora_server | head -1 | awk '{print $3}'
|
|
|
|
module_type generic_data
|
|
|
|
module_end
|
|
|
|
|
2006-03-27 05:37:27 +02:00
|
|
|
|