I made a very simple local check to see if security updates are required on linux hosts and gave it a 10 minute interval between checks.
In the official documentation,
it is stated that:
“They will then only be executed according to a defined interval, buffered, and then this cache will be appended to the agent’s output.”
Is it possible to remove this information from the output?
Which Linux distribution? Debian/Ubuntu? Then you could just use the official mk_apt agent plugin which does just that.
Also see share/doc/check_mk/treasures/mk_apt_hook for an example hook file that resets the cache timestamp just as r.sander suggested. If you copy this to /etc/apt/apt.conf.d/98mk-apt, then it will automatically execute the touch command in a “Post-Invoke” hook after dpkg has run, e.g. after installing updates.
I also saw the YUM plug in, but I am not quite sure it gives me what I want.
Our custom plugin is very simple and gives us the detailed information we required. I will have a test machine soon with a security package required to compare both outputs.
I have some plugins as well with different times. I don’t want to remove the lines at the end:
Cache generated 6 minutes 22 seconds ago, cache interval: 1 hour 0 minutes, elapsed cache lifespan: 10.61%
If you use the local folder there’s no Cache. If you create a folder like 120 (for two minutes) you have a cache.
If you use the plugins folder with 120, the cache is in the output (like <<local:cached(1630064295,3600)>>) but not in the Check result. So you have only the result without the cached information.
You need to add “echo “<<>>”” to the Output - then the plugin is detected by CheckMK
You need to add “echo “<<>>”” to the Output - then the plugin is detected by CheckMK
Where do i have to add this? Does it work with powershell scripts?
until recently it was working with <nnoCacheOutput at the end of line. But after a update it doesn’t work anymore.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.