Installation
The agent works through xinetd, so make sure this package is installed. There’s an example configuration file for the agent in scripts/observium_agent_xinetd.
1. Install xinet.d
root@netflow:/# apt-get install xinetd
2. Copy sample observium_agent from observium installation location.
root@netflow:/# cp /opt/observium/scripts/observium_agent_xinetd /etc/xinetd.d/observium_agent
Modify it, so the Observium server is allowed to connect (substitute 127.0.0.1 or place your IP after it, separated by a space).
3. Make sure to restart xinetd afterwards so the configuration file is read.
root@netflow:/# /etc/init.d/xinetd restart
4. Put observium_agent file (avilable in observium installation location) into /usr/bin/observium_agent, as matching the xinetd file.
root@netflow:/# cp /opt/observium/scripts/observium_agent /usr/bin/observium_agent
5. Create directory for application agent file.
root@netflow:/# mkdir /usr/lib/observium_agent root@netflow:/# mkdir /usr/lib/observium_agent/local
6. Put the agent scripts you want to run in the local directly.
root@netflow:/# cp /opt/observium/scripts/agent-local/apache /usr/lib/observium_agent/local/
Don’t forget to enable the unix-agent module (on your device’s settings tab, modules section) or globally for all *nix devices (in the configuration file, poller modules).
Testing
To verify the agent is running, from your observium server, try telnetting to the monitored host on port 36602.
root@netflow:/# telnet localhost 36602
To verify a specific script is working, you can run it from the command line on the monitored host. Make sure the script is executable (+x), otherwise the agent won’t run it.
Configure Application/Apache
1. First you need mod_status enabled.
root@netflow:/# a2enmod status
2. Enable server-status for apache.
root@netflow:/# vi /etc/apache2/mods-enabled/status.conf
ExtendedStatus On <Location /server-status> SetHandler server-status Order deny,allow Deny from all Allow from 127.0.0.1 [observium server ip] </Location>
3. Also enable server-status from your virtual host
root@netflow:/# vi /etc/apache2/sites-enabled/000-default ExtendedStatus On <Location /server-status> SetHandler server-status Order deny,allow Deny from all Allow from 127.0.0.1 [observium server ip] </Location>
Troubleshoot:
1. Please check the snmp is working properly from your observium server.
root@netflow:/# snmpstatus -c ‘SNMPCommunity’ -v2c MonitoringServerIP
2. Allow All from observium server in /etc/hosts.allow if your are doing tcpwrapper. Do the same for IPTABLES/IPCHAINS also.
[Source: http://www.observium.org/wiki/UNIX_Agent]