icinga-powershell-plugins icon indicating copy to clipboard operation
icinga-powershell-plugins copied to clipboard

Invoke-IcingaCheckDiskHealth Returns Inappropriate Output on Timeout

Open iperry-indigex opened this issue 1 year ago • 5 comments

If the disk health check times out after obtaining a value, it will return [OK] in the output, but because of the timeout, will return with status code 3. image

iperry-indigex avatar Jan 23 '24 18:01 iperry-indigex

Anyone wanna take a shot at this?

iperry-indigex avatar Feb 02 '24 14:02 iperry-indigex

Thank you for the issue. I'm not even sure on how this can happen. Is this reproducible on a constant frame or does it happen random?

It looks to me output is written to the CLI and during that time, Icinga will read everything from the buffer and kills the plugin at the same moment. <Timeout exceeded> is an Icinga thing. Which means, the plugin output is generated and killed before exit code 0 is reached.

LordHepipud avatar Feb 03 '24 10:02 LordHepipud

I have only seen it happen in this one occasion when my boss found it. So in all reality, the output is correct? The plugin itself returns good information and then while cleaning up, icinga kills it for a timeout?

Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: Lord Hepipud @.> Sent: Saturday, February 3, 2024 4:56:00 AM To: Icinga/icinga-powershell-plugins @.> Cc: Ian Perry @.>; Author @.> Subject: Re: [Icinga/icinga-powershell-plugins] Invoke-IcingaCheckDiskHealth Returns Inappropriate Output on Timeout (Issue #382)

Thank you for the issue. I'm not even sure on how this can happen. Is this reproducible on a constant frame or does it happen random?

It looks to me output is written to the CLI and during that time, Icinga will read everything from the buffer and kills the plugin at the same moment. <Timeout exceeded> is an Icinga thing. Which means, the plugin output is generated and killed before exit code 0 is reached.

— Reply to this email directly, view it on GitHubhttps://github.com/Icinga/icinga-powershell-plugins/issues/382#issuecomment-1925277090, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ATVWIRRYXBINOGCBXSXONQLYRYJUBAVCNFSM6AAAAABCHN6MVWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMRVGI3TOMBZGA. You are receiving this because you authored the thread.Message ID: @.***>

iperry-indigex avatar Feb 03 '24 14:02 iperry-indigex

Yeah, the plugin itself reports a healthy state, but before it is exited with code 0 in this case, it is terminated by Icinga with exit code 3 and a timeout exceeded message.

Didn't even know Icinga reads plugin outputs while in a timeout scenario.

@Al2Klimov do you have an idea on how this can happen? To me it looks like the chances to win a lottery is higher than achieving this behaviour😂

LordHepipud avatar Feb 04 '24 13:02 LordHepipud

Exactly. xD But seriously, too late by 1ms is still too late, technically. So you seem to be right: https://github.com/Icinga/icinga-powershell-plugins/issues/382#issuecomment-1925277090

Al2Klimov avatar Feb 12 '24 11:02 Al2Klimov