[Check_mk (english)] caching smartctl plugin in automatically deployed agents

Greetings,

I am deploying agents using the agent bakery, with fair success. However I have run into what appears to be a capability shortall.

I would prefer to cache the smart agent plugin output (for, say, 3600 seconds). This is easy enough to do if manually deploying the agent, but when automatically deploying it the smart plugin is dropped into the plugins directory rather than plugins/3600. There is a rule to set cache age for plugins and local checks, but it is only for the Windows agent.

Has anyone encountered a mechanism for caching the smart plugin in automatically deployed agents (bakery)?

Would not be an issue, but smartctl is not particularly fast/smart, and takes on the order of 45 seconds. If I remove that plugin, the agent returns in .8 seconds.

\- Steve
···

--
Steve Moulton Unix/Linux Systems Engineer
Compute and Data Environment for Science, ADWG, NCCS
Oak Ridge National Laboratory
Voice: 865-574-9609 Fax: 865-576-7605 moultonsa at ornl dot gov

For Linux this has to be done in the bakery ruleset for the agent plugin
itself. If it is not implemented (as with the smart plugin) there is no
other way.

The windows agent has the ini file, where these settings are stored.
This makes it possible to have a generic ruleset.

You should request an implementation change via your support contract.

Regards

···

On 22.05.2018 22:29, Steve Moulton wrote:

Has anyone encountered a mechanism for caching the smart plugin in
automatically deployed agents (bakery)?

--
Robert Sander
Heinlein Support GmbH
Schwedter Str. 8/9b, 10119 Berlin

Tel: 030 / 405051-43
Fax: 030 / 405051-19

Zwangsangaben lt. §35a GmbHG:
HRB 93818 B / Amtsgericht Berlin-Charlottenburg,
Geschäftsführer: Peer Heinlein -- Sitz: Berlin

Robert,

I figured it was something like that. I hacked around it by removing the smart plugin deployment, and putting it in as a custom file in

agents/custom/smart\-cache/lib/plugins/3601/smart

and creating a deploy custom files rule for smart-cache. This way I get the desired behavior (hourly checks).

I tried putting it in 3600, but the bakery blew up on that (since the update checker lives there). Flour everywhere.

Good idea suggesting it.

\- Steve
···

On 05/23/2018 03:23 AM, Robert Sander wrote:

On 22.05.2018 22:29, Steve Moulton wrote:

Has anyone encountered a mechanism for caching the smart plugin in
automatically deployed agents (bakery)?

For Linux this has to be done in the bakery ruleset for the agent plugin
itself. If it is not implemented (as with the smart plugin) there is no
other way.

The windows agent has the ini file, where these settings are stored.
This makes it possible to have a generic ruleset.

You should request an implementation change via your support contract.

Regards

--
Steve Moulton Unix/Linux Systems Engineer
Compute and Data Environment for Science, ADWG, NCCS
Oak Ridge National Laboratory
Voice: 865-574-9609 Fax: 865-576-7605 moultonsa at ornl dot gov