Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exec checks failing - but script logging shows success #136

Open
ale624 opened this issue Jul 31, 2020 · 2 comments
Open

Exec checks failing - but script logging shows success #136

ale624 opened this issue Jul 31, 2020 · 2 comments

Comments

@ale624
Copy link

ale624 commented Jul 31, 2020

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!

@titpetric
Copy link
Contributor

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).

@ale624
Copy link
Author

ale624 commented Sep 30, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants