summaryrefslogtreecommitdiffstats
path: root/zabbix-agent
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xssn.at>2009-11-26 19:42:39 +0100
committerFlorian Pritz <bluewind@xssn.at>2009-11-26 19:42:39 +0100
commit8a3bf2cce64bbc453847a8dfc758c570820bf3b6 (patch)
treead6fe673fe805423f355541d96d4810d4eb61c91 /zabbix-agent
parent1db94feb0c1ea3d1b4cb69c044a9379c8f0f847d (diff)
downloadaur-packages-8a3bf2cce64bbc453847a8dfc758c570820bf3b6.tar.gz
aur-packages-8a3bf2cce64bbc453847a8dfc758c570820bf3b6.tar.xz
add zabbix-agent
Signed-off-by: Florian Pritz <bluewind@xssn.at>
Diffstat (limited to 'zabbix-agent')
-rw-r--r--zabbix-agent/PKGBUILD29
-rw-r--r--zabbix-agent/zabbix-agent.install14
-rw-r--r--zabbix-agent/zabbix-agentd53
-rw-r--r--zabbix-agent/zabbix_agent.conf27
-rw-r--r--zabbix-agent/zabbix_agentd.conf90
5 files changed, 213 insertions, 0 deletions
diff --git a/zabbix-agent/PKGBUILD b/zabbix-agent/PKGBUILD
new file mode 100644
index 0000000..f463225
--- /dev/null
+++ b/zabbix-agent/PKGBUILD
@@ -0,0 +1,29 @@
+# Contributor: Enrico Morelli <morelli@cerm.unifi.it>
+pkgname=zabbix-agent
+pkgver=1.6.6
+pkgrel=1
+pkgdesc="Software for monitoring of your applications, network and servers."
+arch=('i686' 'x86_64')
+url="http://www.zabbix.com"
+license=('GPL')
+install=(zabbix-agent.install)
+source=(http://downloads.sourceforge.net/sourceforge/zabbix/zabbix-$pkgver.tar.gz zabbix_agent.conf zabbix_agentd.conf zabbix-agentd zabbix-agent.install)
+
+md5sums=('52779160e71c12d47b97f7336e25c395'
+ '9c20157a77b1ee4915265971f338fb41'
+ '9e2a08c7dc89dccf6f7b21a156360713'
+ '664cd2ebfc711d722fc62c968704d0ca'
+ 'edbf10ac9776ee7ca3409a3f0ac83917')
+
+
+build() {
+ cd $startdir/src/zabbix-$pkgver
+ ./configure --prefix=/usr --enable-agent
+ make || return 1
+ make DESTDIR=$startdir/pkg install
+ install -d -m0750 $startdir/pkg/var/run/zabbix $startdir/pkg/var/log/zabbix
+ install -d $startdir/pkg/etc/zabbix
+ install -D -m0640 $startdir/src/zabbix_agent.conf $startdir/pkg/etc/zabbix/zabbix_agent.conf
+ install -D -m0640 $startdir/src/zabbix_agentd.conf $startdir/pkg/etc/zabbix/zabbix_agentd.conf
+ install -D -m0755 $startdir/src/zabbix-agentd $startdir/pkg/etc/rc.d/zabbix-agentd
+}
diff --git a/zabbix-agent/zabbix-agent.install b/zabbix-agent/zabbix-agent.install
new file mode 100644
index 0000000..4ea1307
--- /dev/null
+++ b/zabbix-agent/zabbix-agent.install
@@ -0,0 +1,14 @@
+post_install() {
+ groupadd zabbix
+ useradd -g zabbix -d /dev/null zabbix
+ chown -R zabbix:zabbix /var/log/zabbix /var/run/zabbix /etc/zabbix
+}
+
+post_remove() {
+ userdel zabbix
+ rm -rf /var/run/zabbix
+}
+
+op=$1
+shift
+$op $*
diff --git a/zabbix-agent/zabbix-agentd b/zabbix-agent/zabbix-agentd
new file mode 100644
index 0000000..dc31c8e
--- /dev/null
+++ b/zabbix-agent/zabbix-agentd
@@ -0,0 +1,53 @@
+#!/bin/bash
+#
+# Source function library.
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+# Check that networking is up.
+if ck_daemon network; then
+ echo "Cannot run zabbix-agent without network - run network first"
+ exit
+fi
+
+
+start () {
+ stat_busy "Starting zabbix-agent"
+ /usr/sbin/zabbix_agentd &>/dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon zabbix_agentd
+ stat_done
+ fi
+ }
+
+stop() {
+ stat_busy "Stopping zabbix-agent"
+ killall zabbix_agentd
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon zabbix_agentd
+ stat_done
+ fi
+ }
+
+# See how we were called.
+case $1 in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart)
+ stop
+ start
+ ;;
+ *)
+ echo $"Usage: zabbix-agent {start|stop|restart}"
+ exit 1
+ esac
+
+exit $RETVAL
diff --git a/zabbix-agent/zabbix_agent.conf b/zabbix-agent/zabbix_agent.conf
new file mode 100644
index 0000000..dfa5c1b
--- /dev/null
+++ b/zabbix-agent/zabbix_agent.conf
@@ -0,0 +1,27 @@
+# This is config file for zabbix_agent
+# To get more information about ZABBIX,
+# go http://www.zabbix.com
+
+# IP address of ZABBIX server
+# Connections from other hosts will be denied
+
+Server=127.0.0.1
+
+# Spend no more than Timeout seconds on processing
+# Must be between 1 and 30
+
+Timeout=3
+
+####### 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
+#UserParameter=mysql.ping,mysqladmin -uroot ping|grep alive|wc -l
+#UserParameter=mysql.uptime,mysqladmin -uroot status|cut -f2 -d":"|cut -f1 -d"T"
+#UserParameter=mysql.threads,mysqladmin -uroot status|cut -f3 -d":"|cut -f1 -d"Q"
+#UserParameter=mysql.questions,mysqladmin -uroot status|cut -f4 -d":"|cut -f1 -d"S"
+#UserParameter=mysql.slowqueries,mysqladmin -uroot status|cut -f5 -d":"|cut -f1 -d"O"
+#UserParameter=mysql.qps,mysqladmin -uroot status|cut -f9 -d":"
+#UserParameter=mysql.version,mysql -V
diff --git a/zabbix-agent/zabbix_agentd.conf b/zabbix-agent/zabbix_agentd.conf
new file mode 100644
index 0000000..1238980
--- /dev/null
+++ b/zabbix-agent/zabbix_agentd.conf
@@ -0,0 +1,90 @@
+# 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=127.0.0.1
+
+# Server port for sending active checks
+
+#ServerPort=10051
+
+# Unique hostname. Required for active checks.
+
+Hostname=ZABBIX Server
+
+# Listen port. Default is 10050
+
+#ListenPort=10050
+
+# IP address to bind agent
+# If missing, bind to all available IPs
+
+#ListenIP=127.0.0.1
+
+# Source IP address for outgouing connections
+#SourceIP=
+
+# Number of pre-forked instances of zabbix_agentd.
+# Default value is 5
+# This parameter must be between 1 and 16
+
+StartAgents=5
+
+# How often refresh list of active checks. 2 minutes by default.
+
+#RefreshActiveChecks=120
+
+# Disable active checks. The agent will work in passive mode listening server.
+
+#DisableActive=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=1
+
+# Spend no more than Timeout seconds on processing
+# Must be between 1 and 30
+
+Timeout=3
+
+####### 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
+#UserParameter=mysql.ping,mysqladmin -uroot ping|grep alive|wc -l
+#UserParameter=mysql.uptime,mysqladmin -uroot status|cut -f2 -d":"|cut -f1 -d"T"
+#UserParameter=mysql.threads,mysqladmin -uroot status|cut -f3 -d":"|cut -f1 -d"Q"
+#UserParameter=mysql.questions,mysqladmin -uroot status|cut -f4 -d":"|cut -f1 -d"S"
+#UserParameter=mysql.slowqueries,mysqladmin -uroot status|cut -f5 -d":"|cut -f1 -d"O"
+#UserParameter=mysql.qps,mysqladmin -uroot status|cut -f9 -d":"
+#UserParameter=mysql.version,mysql -V
+