Constantine Vorobetz

Problems With Agent Reporting on RHEL7 Systems

Discussion created by Constantine Vorobetz on Nov 21, 2017

If you have a Qualys agent installed on a lInux system, that hasn’t been reporting, the following solution could solve the problem:

 

On RHEL7 systems, if the agent stops checking in after a system reboot.  The problem occurs because the startup was happening before the network was available. On RHEL7 systems, the service configuration file is currently missing a statement, that makes the agent start before the network is available.

 

You need to add an After=network.target in /usr/lib/systemd/system/qualys-cloud-agent.service.  However, It’s important to note that you never want to edit the original unit file, because if there is a package upgrade, the original unit file could get overwritten.  

 

For systemd, there is an edit keyword where you can say:

 

systemd edit unit-name.service

 

And it will give you the default editor and create a "drop-in" or "override" file where it needs to go.  So doing:

 

systemctl edit qualys-cloud-agent.service

 

And putting in:

 

Unit]

Description=Qualys cloud agent daemon

After=network.target

 

...and saving it, will create:

 

/etc/systemd/system/qualys-cloud-agent.service.d/override.conf

 

After that, reboot the host, and the problem should be corrected.

Outcomes