Yum Updates Plugin

This plugin monitors the number of available yum package updates on RHEL-based operating systems, such as RHEL, CentOS, AlmaLinux, Rocky Linux, Oracle Linux, and CloudLinux. For Ubuntu and Debian, use the apt-updates plugin instead.

Reported Metrics

This plugin reports the following metrics:

  • security: number of available security updates.
  • all: total number of available updates. It includes the security updates.

To get the number of non-security updates, subtract security from all.

Requirements

  • yum is installed. On newer releases, yum is an alias for dnf.
  • yum --security has to work. On older releases, such as CentOS 6 and 7, this may require the yum-plugin-security package.

You don't need to add anything to sudoers. The plugin runs yum as the agent360 user and only lists available updates, which doesn't need root.

Don't give agent360 sudo access to yum. An entry like agent360 ALL=(ALL) NOPASSWD: /usr/bin/yum lets the agent user install or remove packages as root, which is full control of the server. The plugin doesn't use sudo, so the entry has no effect on it.

Configure the plugin

Add the following lines to the /etc/agent360-custom.ini file:

[yum-updates]
enabled = yes
interval = 3600

interval is how often the plugin runs, in seconds. Checking once an hour is enough, because yum can be slow.

Test the plugin

Run the following command:

sudo -u agent360 agent360 test yum-updates

The output should show the security and all values.

Then restart the agent for the change to take effect:

service agent360 restart

Troubleshooting

  • security is always 0, or the test shows an error. The yum --security option isn't available on your system. Install yum-plugin-security if your release needs it, and run yum -q list updates --security as the agent360 user to check.
  • Values are 0 but updates exist. Run sudo -u agent360 yum -q list updates. If it fails for the agent360 user, check the repository metadata cache and the repository configuration.
  • No data in the dashboard. Make sure the plugin section is in /etc/agent360-custom.ini and that you restarted the agent.

Did this page help you?