checkup icon indicating copy to clipboard operation
checkup copied to clipboard

Exec checks failing - but script logging shows success

Open ale624 opened this issue 5 years ago • 2 comments

Hi,

I am running the latest version of checkup on a Windows Server 2019 VM. I have it configured to do many basic HTTP, TLS and port checks, all of which work perfectly with almost no false positives.

However, I wanted some more, in depth checks for a few things, so I have two PowerShell scripts running via exec. Here is my config for launching them:

    "type": "exec",
    "name": "SanCheck",
    "command": "powershell",
    "arguments": ["-ExecutionPolicy", "Bypass", "-File", "c:\\checkup\\santest.ps1"],
    "Threshold_RTT": 60000000000000
    },
    {
    "type": "exec",
    "name": "Cluster Status",
    "command": "powershell",
    "arguments": ["-ExecutionPolicy", "Bypass", "-File", "c:\\checkup\\cluster-Online.ps1"],
    "Threshold_RTT": 6000000000000
    },
    {
    "type": "exec",
    "name": "Printer Webcam 1",
    "command": "curl",
    "arguments": ["http://192.168.1.6:8080/?action=snapshot_1 --output temp.jpg --max-time 2"]
    },

Now. The last check, the webcam one, never give me a false positives. it takes less than a second to complete.

The first two are more complex and take between 2 and 9 seconds to complete their tasks and return a result. As you can see I have added a huge threshold to these as I do not want them ever timing out. However, quite frequently I get alerted that these exec checks are failing.

I enabled logging on these scripts to see if they really were failing or not, and they return good results every time, bar a few when it seem like the script was forcibly closed for some reason.

Nothing I can do seems to stop these from giving me lots of false positives every day. I will attach the PowerShell scripts for you to take a look at, but they are nothing crazy.

Powershell scripts.zip

Im fairly sure this is a bug cutting the execution off, but if this is a config issue on my part would greatly appreciate some help!

ale624 avatar Jul 31 '20 13:07 ale624

I figured I commented on this before: can you split the arguments for 3. like you did for 1. and 2.? It looks like you're sending the complete string as only one argument instead of 5. It would always result in a failure (as long as curl returns a non-zero exit currently).

titpetric avatar Sep 30 '20 12:09 titpetric

Hi,

No the Curl works perfectly, never had any issues with that. I have managed to work-around it by making the "long" scripts log to a file and then checkup just check the file for the result.

it was very intermittent, but frustrating and only triggered false positives on the "long" running exec's. (1 and 2) it looked like the long running exec checks just got killed mid-execution sometimes.

ale624 avatar Sep 30 '20 12:09 ale624