icinga2 icon indicating copy to clipboard operation
icinga2 copied to clipboard

Add check_smart.pl plugin as smart-advanced command

Open Napsty opened this issue 4 years ago • 5 comments

This PR adds the check_smart.pl monitoring plugin under the smart-advanced check command (smart is already used by the check_ide_smart plugin).

Napsty avatar Jun 03 '20 06:06 Napsty

Hi guys, do you still need something from me? I'm not sure from the notes above.

Napsty avatar Feb 25 '21 15:02 Napsty

I think we mainly have to agree on notation here. Meanwhile, I could remember a similar case with different checks: postgres where you can either pass a hostname or address as -H or a Unix Domain Socket as -s. But this case is special as -H is already set by default, but I suggest doing the following:

Always put the device name in smart_device (regardless of whether it's a glob or not) and have a second variable smart_device_is_glob that devices whether -d $smart_device$ or -g $smart_device$ is passed to the plugin.

@Al2Klimov What do you think of this?

For reference, this is how it's done for postgres: https://github.com/Icinga/icinga2/blob/430897901891a5d6170e8d0c2f6771c1b167b233/itl/plugins-contrib.d/databases.conf#L519-L523

julianbrost avatar Mar 02 '21 14:03 julianbrost

@julianbrost OK let's try the latest version, see my commit https://github.com/Icinga/icinga2/pull/8041/commits/ca9fcf3ef7fea0791e093550e81a99acbc20dcd4. I'm using the same way from your example with from postgres check. Never used this macro way though, so you'd have to tell me if that was correctly used. Documentation adjusted. New parameter smart_ssd_lifetime added.

Napsty avatar Apr 22 '21 14:04 Napsty

This is now 1y pending ... still no improvement yet.

waja avatar Jul 18 '22 19:07 waja

Yes, that's on me. I always need some time to re-think into that issue every time, but some disasters always come in between. Sorry about that.

Napsty avatar Jul 18 '22 19:07 Napsty