Increase timeout hpasm



I’ve got a server when i use the remote check_hpasm plugin, I’ve got a timeout (because the commande take more than 60seconds : generally it’s take 60,05 seconds :pensive: )
I tryin to increase the timeout of the check_hpasm plugin directelly in /usr/lib64/nagios/plugins/check_hpasm to 90sec but it’s not working. I always have the timeout in the GUI icingaweb after 60sec

cat /usr/lib64/nagios/plugins/check_hpasm | grep timeout
license timeout)) {
timeout => 90,
spec => ‘timeout|t=i’,
help => “-t, --timeout=INTEGER\n Seconds before plugin times out (default: %s)”,
default => $DEFAULT{timeout},
my %DEFER_ARGS = map { $_ => 1 } qw(timeout verbose);
timeout => { default => $DEFAULT{timeout} },

Add attr to private _attr hash (except timeout)

$self->{timeout} = delete $attr{timeout};
usage => 'Usage: %s [ -v|–verbose ] [ -t ] '.
timeout => 90,

I’ve checked this topic Check_hpasm timeout setting not working but I don’t need to create a command parameter there is a template I think (just can’t find it)
May be I need to do something else but I don’t know why


60s is the default check command timeout of icinga2.

Add a timeout = 2m to your check command definition, to change the commands timeout to 2 minutes (example). Values in seconds are also supported.


I add in my check services

apply Service “hardware HP” {
check_command = “hpasm”
vars.hpasm_community = “mycommunity”
vars.hpasm_protocol = “1”
vars.hpasm_timeout = “90”
max_check_attempts = 5
check_interval = 1h
retry_interval = 5m
assign where host.vars.hp_hardware == true && host.address

but it’s not working


You need to add the parameter to the check command definition.

Are you using config files or the Icinga Director?


Yup, I just find where the ITIL are under /usr/share/icinga2/include/plugins-contrib.d/hardware.conf and there isn’t a timeout definition :wink:
just add vars.hpasm_timeout = “$hpasm_timeout$” I’ll edit my post if it work


I’m not sure if editing ITL definitions is a good idea.
They will probably be reverted on the next update anyway.

Try creating a new command that imports the existing “hpasm” one and add the timeout setting there:

object CheckCommand "hpasm_new" {
    import "plugin-check-command"
    import "hpasm"

    timeout = 90s

The 60 second timeout you are seeing will be most likely from icinga2 and not the plugin script, if it is always at 60 seconds.


You’re right !
Thanks you log1c for your help.