This addon provides the agent for monitoring the IPFire instance by Zabbix Monitoring.

Requirements

You need a running Zabbix Server and you should be aware of how to integrate hosts monitored by agents into your environment.

Installation

  • Install the addon via Pakfire
  • Modify the configuration files to fit your needs as described under the next heading
  • Restart the agent to apply your changed config
  • Create firewall rule(s) to allow the communication between the agent and your server/proxy

Configuration

The addon is shipped with a default configuration file and some additional directories and files:

  • /etc/zabbix_agentd/zabbix_agentd.conf - The main configuration file. This file is included in the backup of this addon.
    See /etc/zabbix_agentd/zabbix_agentd.conf.example or the original documentation for help.
    Please note: The parameters Server and ServerActive have to be set to your Zabbix Server's (or Proxy's) IP/DNS in order to allow access to the agent. They are both set to 127.0.0.1 by default for security reasons.
    Also note: On new installations the ListenIP is set to the GREEN IP address by default for security reasons. Remove this line to listen on ALL interfaces (not recommended).
    Warning: This addon installation or upgrade will automatically add 2 Include directives to this file which should not be modified to ensure that Zabbix Agent will properly run on IPFire:

    • Include=/var/ipfire/zabbix_agentd/userparameters/*.conf - Activates IPFire specific item keys for Zabbix to monitor.
      You can disable those userparameters by commenting out this configuration directive by placing a hash sign in front of the line. Do NOT remove or alter the line in any other way as then it will be re-added on next addon upgrade.

    • Include=/var/ipfire/zabbix_agentd/zabbix_agentd_ipfire_mandatory.conf - Mandatory agent configuration for running on an IPFire system. Do not alter or remove this line as Zabbix Agent will then no longer work.

  • /etc/zabbix_agentd/zabbix_agentd.d - Files containing UserParameters should go here. They need to have the extension *.conf. This directory is included in the backup of this addon.

  • /etc/zabbix_agentd/scripts - Additional scripts e.g. for UserParameters should go here. This directory is included in the backup of this addon.
  • /usr/lib/zabbix - Custom agent modules go here. This directory is included in the backup of this addon.
  • /etc/sudoers.d/zabbix_agentd - Sudoers file required for IPFire specific userparameters. Do not alter this file as it is not included in the addon backup and will be overwritten on next update.
  • /etc/sudoers.d/zabbix_agentd_user - This file can be modified to allow certain commands to be executed with sudo if needed by a UserParameter. This file will be included in a backup of this addon. Do not change the filename!
  • /var/log/zabbix/zabbix_agentd.log Deprecated LogFile.
    Since IPFire 2.27 CU 175 Zabbix Agentd logs are integrated in the IPFire's web interface.
    If you upgraded from a previous version, this file can be safely removed and will no longer be updated.

Usage

Next to the default Zabbix Agent item keys the addon also includes a number of IPFire specific item keys that can be checked by Zabbix:

  • IPFire services (default IPFire services and possible Addon services)
  • Pakfire status (Installed version, Available update(s))
  • Network stats (Line quality, Open Connections, Firewall hits)
  • OpenVPN Clients (Bytes receives/sent, Client properties, Connections status, Certificates, ...)

An IPFire instance with the zabbix_agentd addon installed can thus be monitored by Zabbix using these templates:

  • Linux by Zabbix Agent Active (recommended) or Linux by Zabbix Agent - For monitoring base Linux OS (CPU, memory, FS, ...)
    Note: the item system.sw.packages.get of that template will fail as IPFire has no package manager that is natively supported by Zabbix Agent. Disable that item in Zabbix on your IPFire host to prevent zabbix-agentd to periodically log about that item not being supported.
  • Template App Squid SNMP - For monitoring IPFire Proxy
    For this to work you have to enable Squid SNMP access for the Zabbix server by editing /var/ipfire/proxy/advanced/acls/include.acl and adding:

    snmp_port 3401
    acl zabbix_server src <zabbix_server_ip>/32
    acl zabbix_user snmp_community public
    snmp_access allow zabbix_user zabbix_server
    

    (Add your Zabbix Server IP address and optionally change snmp_port and snmp_community if desired)
    Then click on "Save and restart" on the IPFire Services > Web Proxy webUI page to regenerate the squid config and restart squid.
    Make sure to adapt the usermacro's defined in the template.

  • IPFire by Zabbix Agent Active - for monitoring the IPFire specific item keys: