librenms / librenms-agent

LibreNMS Agent & Scripts
GNU General Public License v2.0
118 stars 188 forks source link

Cache package manager responses to reduce load #267

Closed LukaszMoskala closed 4 years ago

LukaszMoskala commented 4 years ago

Hi,

I modified osupdate script a little to only execute package manager every 5 hours. This is usefull on older hardware, where executing this script every 5 minutes caused significant resources usage.

Maybe this will be usefull for someone.

claassistantio commented 4 years ago

CLA assistant check
All committers have signed the CLA.

PipoCanaja commented 4 years ago

Hi @LukaszMoskala You should also document this in LibreNMS (linked to this PR) so we can merge it all at once. Thx

LukaszMoskala commented 4 years ago

Hi @PipoCanaja, You mean that I should update doc at https://github.com/librenms/librenms/blob/master/doc/Extensions/Applications.md, create pull request, and mention that pull request here? Thanks

kkrumm1 commented 4 years ago

Yes

LukaszMoskala commented 4 years ago

Done. Updated documentation in librenms/librenms#11083

murrant commented 4 years ago

Just FYI, this is built in to snmpd: snmpset -v2c -c secret localhost 'NET-SNMP-EXTEND-MIB::nsExtendCacheTime."osupdate"' i 3000

LukaszMoskala commented 4 years ago

I didn't know that. That seems like much better solution.

Thanks