Sophie

Sophie

distrib > * > cooker > x86_64 > by-pkgid > 1750332a930355be51699ac27de82487 > files > 2

monitorix-1.2.0-4mdv2011.0.noarch.rpm

#!/usr/bin/perl
#
#	@(#) Fibranet NSP, SL
#	Copyright (C) 2005-2007 by Jordi Sanfeliu <admin@fibranet.cat>
#
#	config file for Monitorix
#
# +----------------------------------------+----------------------+
# |                                        |  image number 2      |
# |      image number 1                    +----------------------+
# |                                        |  image number 3      |
# +----------------------------------------+----------------------+
#
# +--------------------+---------------------+--------------------+
# |  image number 1    |  image number 3     |  image number 5    |
# +--------------------+---------------------+--------------------+
# |  image number 2    |  image number 4     |  image number 6    |
# +--------------------+---------------------+--------------------+
#
#
# Rigid levels = 0, 1 or 2:
#	0 - No rigid, no lower-limit and no upper-limit
#	1 - No rigid, but with lower-limit and upper-limit
#	2 - Rigid with lower-limit and upper-limit
#
# All LIMIT values are really limited if RIGID == 2 (RRD feature).
#

use strict;

# General
our $TITLE="FIBRANET NSP, SL";		# your company name
our $HOSTNAME="";			# hostname of this server
our $OSTYPE="Linux-RHFC";		# choose your OS type (see below)
our $IDATE="01 Jan 2007";		# initial statistics date
our $SAMBAVER="3";			# Samba version (2 or 3)
our $MULTIHOST="N";			# Enable multihost feature
our $MULTIHOST_FOOTER="Y";		# (multihost) display URL in image
our $MULTIHOST_IMGPERLINE="2";		# (multihost) # of images per line
our $REPORT_LANG="en";			# Report language
our $THEME_COLOR="black";		# Default is "black", none is "white"
our $EMAIL="root\@localhost";		# Generic email for reports
our $REFRESH_RATE="150";		# Web stats' refresh rate in seconds

# Enable or disable the graphs
our $ENABLE_CPU = "Y";			# Enable CPU graph if not = "N"
our $ENABLE_KERN = "Y";			# Enable KERN graph if not = "N"
our $ENABLE_PROC = "Y";			# Enable PROC graph if not = "N"
our $ENABLE_DISK = "Y";			# Enable DISK graph if not = "N"
our $ENABLE_NET = "Y";			# Enable NET graph if not = "N"
our $ENABLE_SERVU = "Y";		# Enable SERVU graph if not = "N"
our $ENABLE_PORT = "Y";			# Enable PORT graph if not = "N"
our $ENABLE_USER = "Y";			# Enable USER graph if not = "N"
our $ENABLE_INT = "Y";			# Enable INT graph if not = "N"
our $ENABLE_LMTEMP = "N";		# Enable LMTEMP graph

our $ENABLE_ZOOM = "Y";			# Enable Zoom feature

# CPU stats configuration
our $CPU1_RIGID="1";			# rigid level
our $CPU1_LIMIT="1";			# CPUs max value
our $CPU2_RIGID="0";			# rigid level
our $CPU2_LIMIT="100";			# NPROC max value
our $MEMORY="256";			# MB of memory

# KERNEL stats configuration
our $KERN_GRAPH_MODE="R";		# Percentages layout (R=Real, S=Stacked)

# HP/Compaq servers supported for temperatures graphs
# ML310, ML330, ML350, ML570
our $MACHINE="";			# HP/Compaq server model

# LM-Sensors based systems
our %SENSORS_LIST = ("MB" => "M/B Temp",
		     "CPU1" => "CPU Temp",
		     "FAN1" => "fan1",
		     "FAN2" => "fan2",
		     "FAN3" => "fan3");
our @HDDTEMP_LIST = ("/dev/hda");	# max 9 hard disk drives

# DISK stats configuration
our @MNT_LIST =("/boot");		# max 7 mount points
our @MNT_ACOL =("#444444",
		"#44EEEE",
		"#EE44EE",
		"#EEEE44",
		"#44EE44",
		"#4444EE",
		"#FFA500");		# predefined mount area colors
our @MNT_LCOL =("#444444",
		"#00EEEE",
		"#EE00EE",
		"#EEEE00",
		"#00EE00",
		"#0000EE",
		"#DDA500");		# predefined line2 colors
our $DISK2_RIGID="2";			# rigid level
our $DISK2_LIMIT="1000";		# IOCount max value
our $DISK3_RIGID="2";			# rigid level
our $DISK3_LIMIT="1000";		# Sector max value

# NET stats configuration
our @NET_LIST =("eth0");		# net devices (max 5)
our @NET_TYPE =("FastEthernet LAN");	# device description
our @NET_RIGID=("0");			# rigid level
our @NET_LIMIT=("10000000");		# bytes per second max value
our $INETIF="eth0";			# specify inet interface (eth0, eth1)

# SERVU stats configuration
our $SERVU1_RIGID="0";			# rigid level
our $SERVU1_LIMIT="1000";		# Services max value
our $SERVU2_RIGID="0";			# rigid level
our $SERVU2_LIMIT="1000";		# POP3 hits max value
our $SERVU3_RIGID="0";			# rigid level
our $SERVU3_LIMIT="1000";		# WWW hits max value

# Port numbers
# For those ports you don't want monitorize, please leave the variable defined
# as simply "our $PORTnn;" (without quotes) where nn is the port number.
our $PORT01="25";
our $PORT02="21";
our $PORT03="80";
our $PORT04="22";
our $PORT05="23";
our $PORT06="110";
our $PORT07="139";
our $PORT08="3306";
our $PORT09="4559";
our $PORT10="3128";
our $PORT11="53";
our $PORT12="143";

# Port names
# For those ports you don't want monitorize, please leave the variable defined
# as simply "our $PORTnn_NAME;" (without quotes) where nn is the port number.
our $PORT01_NAME="SMTP";
our $PORT02_NAME="FTP";
our $PORT03_NAME="WWW";
our $PORT04_NAME="SSH";
our $PORT05_NAME="TELNET";
our $PORT06_NAME="POP3";
our $PORT07_NAME="NETBIOS";
our $PORT08_NAME="MYSQL";
our $PORT09_NAME="FAX";
our $PORT10_NAME="SQUID";
our $PORT11_NAME="DNS";
our $PORT12_NAME="IMAP";

# PORT1 stats configuration
our $PORT01_RIGID="2";			# rigid level
our $PORT01_LIMIT="1000";		# PORT01 max value
our $PORT02_RIGID="2";			# rigid level
our $PORT02_LIMIT="1000";		# PORT02 max value
our $PORT03_RIGID="2";			# rigid level
our $PORT03_LIMIT="1000";		# PORT03 max value
our $PORT04_RIGID="2";			# rigid level
our $PORT04_LIMIT="1000";		# PORT04 max value
our $PORT05_RIGID="2";			# rigid level
our $PORT05_LIMIT="1000";		# PORT05 max value
our $PORT06_RIGID="2";			# rigid level
our $PORT06_LIMIT="1000";		# PORT06 max value

# PORT2 stats configuration
our $PORT07_RIGID="2";			# rigid level
our $PORT07_LIMIT="1000";		# PORT07 max value
our $PORT08_RIGID="2";			# rigid level
our $PORT08_LIMIT="1000";		# PORT08 max value
our $PORT09_RIGID="2";			# rigid level
our $PORT09_LIMIT="1000";		# PORT09 max value
our $PORT10_RIGID="2";			# rigid level
our $PORT10_LIMIT="1000";		# PORT10 max value
our $PORT11_RIGID="2";			# rigid level
our $PORT11_LIMIT="1000";		# PORT11 max value
our $PORT12_RIGID="2";			# rigid level
our $PORT12_LIMIT="1000";		# PORT12 max value

# USER stats configuration
our $USER1_RIGID="0";			# rigid level
our $USER1_LIMIT="100";			# Login/SSH max value
our $USER2_RIGID="0";			# rigid level
our $USER2_LIMIT="100";			# Samba max value
our $USER3_RIGID="0";			# rigid level
our $USER3_LIMIT="100";			# NetaTalk max value

# INT stats configuration
our $INT1_RIGID="0";			# rigid level
our $INT1_LIMIT="100";			# Generic Interrupt max value
our $INT2_RIGID="0";			# rigid level
our $INT2_LIMIT="100";			# Core-devices max value
our $INT3_RIGID="0";			# rigid level
our $INT3_LIMIT="100";			# Low-devices max value

# List of Servers
our @SERV_LIST;

# Defined colors for black mode
our %BLACK = ("canvas" => "#000000",
		"back" => "#101010",
		"font" => "#C0C0C0",
		"mgrid" => "#80C080",
		"grid" => "#808020",
		"frame" => "#808080",
		"arrow" => "#FFFFFF",
		"shadea" => "#404040",
		"shadeb" => "#404040" );

# PC LAN for accounting traffic bytes
our $PC_DEFMAIL=$EMAIL;			# default when @PC_MAIL is not used
our @PC_MAIL;				# email for each pc on LAN
our $PC_MAX=100;			# far enough (DON'T TOUCH THIS!)
our @PC_LIST;
#our @PC_LIST = ("pc101",		# list of pc on LAN (DNS name)
#		"pc102",
#		"pc103");
#our @PC_IP   = ("192.168.1.101/32",	# list of pc on LAN (IP address + mask)
#		"192.168.1.102/32",
#		"192.168.1.103/32");


# Paths
our %SMBSTATUS = ("Linux-RHFC" => "/usr/bin/smbstatus",
		"Linux-Debian" => "/usr/bin/smbstatus",
		"Linux-Gentoo" => "/usr/bin/smbstatus",
		"Linux-Slack" => "/usr/bin/smbstatus",
		"FreeBSD" => "/usr/local/bin/smbstatus");
our %MACUSERS = ("Linux-RHFC" => "/usr/bin/macusers",
		"Linux-Debian" => "/usr/bin/macusers",
		"Linux-Gentoo" => "/usr/bin/macusers",
		"Linux-Slack" => "/usr/bin/macusers",
		"FreeBSD" => "/usr/local/bin/macusers");
our %HTTP_LOG = ("Linux-RHFC" => "/var/log/httpd/access_log",
		"Linux-Debian" => "/var/log/apache2/access.log",
		"Linux-Gentoo" => "/var/log/apache2/access.log",
		"Linux-Slack" => "/var/log/httpd/access.log",
		"FreeBSD" => "/var/log/httpd-access.log");
our %SECURE_LOG = ("Linux-RHFC" => "/var/log/secure",
		"Linux-Debian" => "/var/log/auth.log",
		"Linux-Gentoo" => "/var/log/messages",
		"Linux-Slack" => "/var/log/secure",
		"FreeBSD" => "/var/log/auth.log");

our %PATH_CRON = ("Linux-RHFC" => "/etc/cron.d/monitorix.sh",
		"Linux-Debian" => "/etc/cron.d/monitorix.sh",
		"Linux-Gentoo" => "/etc/cron.d/monitorix",
		"Linux-Slack" => "/etc/cron.d/monitorix.sh",
		"FreeBSD" => "/var/cron/tabs/monitorix.sh");
our %PATH_BIN = ("Linux-RHFC" => "/usr/sbin/monitorix.pl",
		"Linux-Debian" => "/usr/bin/monitorix.pl",
		"Linux-Gentoo" => "/usr/sbin/monitorix.pl",
		"Linux-Slack" => "/usr/sbin/monitorix.pl",
		"FreeBSD" => "/usr/local/sbin/monitorix.pl");
our %BASE_WWW = ("Linux-RHFC" => "/var/www/html",
		"Linux-Debian" => "/var/www",
		"Linux-Gentoo" => "/var/www/localhost/htdocs",
		"Linux-Slack" => "/var/www/htdocs",
		"FreeBSD" => "/usr/local/www/data");
our %BASE_DIR = ("Linux-RHFC" => "/var/lib/monitorix/",
		"Linux-Debian" => "/var/lib/monitorix/",
		"Linux-Gentoo" => "/var/lib/monitorix/",
		"Linux-Slack" => "/var/lib/monitorix/",
		"FreeBSD" => "/usr/local/lib/monitorix/");

# =======================================================================
# ======  Probably you dont have to touch anything below this line ======
# =======================================================================

our @GRAPH_NAME = ("cpu",
		"kern",
		"proc",
		"hptemp",
		"lmtemp",
		"disk",
		"net",
		"servu",
		"port",
		"user",
		"int" );

our %GRAPH_TITLE = ( "cpu" => "CPU load average and memory usage",
			"kern" => "Global kernel usage",
			"proc" => "Kernel usage per processor",
			"hptemp" => "HP Core temperatures",
			"lmtemp" => "LM-Sensors and disk temperatures",
			"disk" => "Disk i/o activity and usage",
			"net" => "Network traffic and usage",
			"servu" => "Network services demand",
			"port" => "Network port traffic",
			"user" => "Users using the system",
			"int" => "Devices interrupt activity" );

our %GRAPHS   =("CPU load" => "_cpu1",
		"Processes" => "_cpu2",
		"Memory" => "_cpu3",
		"Kernel usage" => "_kern1",
		"Context switches" => "_kern2",
		"Unused" => "_kern3",
		"Processor 00" => "_proc00",
		"Processor 01" => "_proc01",
		"Processor 02" => "_proc02",
		"Processor 03" => "_proc03",
		"Processor 04" => "_proc04",
		"Processor 05" => "_proc05",
		"Processor 06" => "_proc06",
		"Processor 07" => "_proc07",
		"CPU temperatures" => "_hptemp1",
		"MB temperatures" => "_hptemp2",
		"Disk drives temperatures" => "_lmtemp1",
		"MB and CPU temperatures" => "_lmtemp2",
		"Fan speeds" => "_lmtemp3",
		"Disk usage" => "_disk1",
		"Disk i/o activity" => "_disk2",
		"Disk sectors activity" => "_disk3",
		"Network eth0 traffic" => "_net01",
		"Network eth0 packets" => "_net02",
		"Network eth0 errors" => "_net03",
		"Network eth1 traffic" => "_net11",
		"Network eth1 packets" => "_net12",
		"Network eth1 errors" => "_net13",
		"Network eth2 traffic" => "_net21",
		"Network eth2 packets" => "_net22",
		"Network eth2 errors" => "_net23",
		"Network services demand" => "_servu1",
		"POP3 service demand" => "_servu2",
		"WWW service demand" => "_servu3",
		"Port 01 traffic" => "_port01",
		"Port 02 traffic" => "_port02",
		"Port 03 traffic" => "_port03",
		"Port 04 traffic" => "_port04",
		"Port 05 traffic" => "_port05",
		"Port 06 traffic" => "_port06",
		"Port 07 traffic" => "_port07",
		"Port 08 traffic" => "_port08",
		"Port 09 traffic" => "_port09",
		"Port 10 traffic" => "_port10",
		"Port 11 traffic" => "_port11",
		"Port 12 traffic" => "_port12",
		"SSH/Telnet users" => "_user1",
		"Samba users" => "_user2",
		"NetaTalk users" => "_user3",
		"Interrupt activity" => "_int1",
		"Core activity" => "_int2",
		"Low-Devices activity" => "_int3");

# Pathnames
our $BASE_URL="http://" . $ENV{HTTP_HOST};
our $USAGE_DIR="usage/";
our $REPORT_DIR="reports/";
our $IMGSEMAIL_DIR="imgs_email/";

our $CPU_RRD=$BASE_DIR{$OSTYPE} . "cpu.rrd";
our $KERN_RRD=$BASE_DIR{$OSTYPE} . "kern.rrd";
our $PROC_RRD=$BASE_DIR{$OSTYPE} . "proc.rrd";
our $DISK_RRD=$BASE_DIR{$OSTYPE} . "disk.rrd";
our $NET_RRD=$BASE_DIR{$OSTYPE} . "net.rrd";
our $SERVU_RRD=$BASE_DIR{$OSTYPE} . "servu.rrd";
our $PORT_RRD=$BASE_DIR{$OSTYPE} . "port.rrd";
our $USER_RRD=$BASE_DIR{$OSTYPE} . "user.rrd";
our $INT_RRD=$BASE_DIR{$OSTYPE} . "int.rrd";
our $PC_RRD=$BASE_DIR{$OSTYPE} . "pc.rrd";
our $HPTEMP_RRD=$BASE_DIR{$OSTYPE} . "hptemp.rrd";
our $LMTEMP_RRD=$BASE_DIR{$OSTYPE} . "lmtemp.rrd";

our $LOGO=$BASE_DIR{$OSTYPE} . $REPORT_DIR . $REPORT_LANG . "/" . $IMGSEMAIL_DIR . "logo.jpg";
our $TIT=$BASE_DIR{$OSTYPE} . $REPORT_DIR . $REPORT_LANG . "/" . $IMGSEMAIL_DIR . "title.jpg";
our $BLANK=$BASE_DIR{$OSTYPE} . $REPORT_DIR . $REPORT_LANG . "/" . $IMGSEMAIL_DIR . "blank.png";
our $SIGN=$BASE_DIR{$OSTYPE} . $REPORT_DIR . $REPORT_LANG . "/" . $IMGSEMAIL_DIR . "signature.png";