The Observium Unix Agent is a collection of scripts which return statistical data for a Linux host. The Agent allows us to poll more complex statistics and information from Linux and some Unix hosts.
Please note that SNMP is still required on any devices with the agent, the agent simply provides additional data which can't be accessed via SNMP.
All Agent data is pulled in one TCP connection during the unix-agent module. The module populates an
$agent_data array which can be used by other modules. For example:
$agent_data = ['app'] => ['apache'] => ... DATA ... ['bind'] => ... DATA ... ['other'] => ... DATA ...
The preferred method of running the Unix agent is via xinetd, preferably with an iptables firewall only allowing access from the monitoring server(s). Make sure this package is installed.
sudo apt-get install xinetd
Observium provides an example xinetd configuration file. Copy this from Observium to the server that will be running the agent.
scp /opt/observium/scripts/observium_agent_xinetd user@your_server:/etc/xinetd.d/observium_agent_xinetd
observium_agent_xinetd so the Observium server is allowed to connect. You can do this by substituting
127.0.0.1, or place your IP after it, separated by a space. Make sure to restart xinetd afterwards so the configuration file is read.
sudo service xinetd restart
observium_agent script from Observium to the server that will be running the agent.
scp /opt/observium/scripts/observium_agent user@your_server:/usr/bin/observium_agent
sudo mkdir -p /usr/lib/observium_agent
Copy all agent scripts into the
scripts-available directory, and place a symbolic link into
scripts-enabled for the ones you want to enable:
scp /opt/observium/scripts/agent-local/* user@your_server:/usr/lib/observium_agent/scripts-available sudo ln -s /usr/lib/observium_agent/scripts-available/os /usr/lib/observium_agent/scripts-enabled sudo ln -s /usr/lib/observium_agent/scripts-available/dmi /usr/lib/observium_agent/scripts-enabled sudo ln -s /usr/lib/observium_agent/scripts-available/apache /usr/lib/observium_agent/scripts-enabled
If you prefer to use a simpler layout and don't need the ability to enable/disable specific scripts using symbolic links, you can alternatively simply create a
/usr/lib/observium_agent/local directory and put the agent scripts you want to run in the
local directory directly:
sudo mkdir -p /usr/lib/observium_agent/local scp /opt/observium/scripts/agent-local/os user@your_server:/usr/lib/observium_agent/local
Enabling Observium's Unix Agent module¶
Next, enable the unix-agent module (on your device's settings tab, modules section) or globally for all *nix devices in the
config.php configuration file:
$config['poller_modules']['unix-agent'] = 1;
To verify the agent is running, try to telnet from your Observium server to the monitored server on port 36602. If you see a blast of output, then the agent is working and is available to Observium.
telnet your_server 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.
chmod +x /usr/bin/observium_agent /usr/bin/observium_agent
scripts/agent-local directory of your Observium installation includes various modules which can be placed into
/usr/lib/observium_agent/local to add additional functions to the agent. The files you want to be executed have to be marked as executable with
As this infrastructure is currently in development, it is recommended that these are downloaded to the server via SVN and symlinked into place, allowing updating of the scripts either manually or via cron.
Please refer to the Applications page for a list of supported apps.