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
yumis installed. On newer releases,yumis an alias fordnf.yum --securityhas to work. On older releases, such as CentOS 6 and 7, this may require theyum-plugin-securitypackage.
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
agent360sudo access toyum. An entry likeagent360 ALL=(ALL) NOPASSWD: /usr/bin/yumlets the agent user install or remove packages as root, which is full control of the server. The plugin doesn't usesudo, 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 = 3600interval 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-updatesThe output should show the security and all values.
Then restart the agent for the change to take effect:
service agent360 restartTroubleshooting
securityis always0, or the test shows an error. Theyum --securityoption isn't available on your system. Installyum-plugin-securityif your release needs it, and runyum -q list updates --securityas theagent360user to check.- Values are
0but updates exist. Runsudo -u agent360 yum -q list updates. If it fails for theagent360user, check the repository metadata cache and the repository configuration. - No data in the dashboard. Make sure the plugin section is in
/etc/agent360-custom.iniand that you restarted the agent.
Updated about 17 hours ago