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

Duration of a down event in the succeeded email notification #935

Open
cpina opened this issue Mar 11, 2022 · 7 comments
Open

Duration of a down event in the succeeded email notification #935

cpina opened this issue Mar 11, 2022 · 7 comments

Comments

@cpina
Copy link
Contributor

cpina commented Mar 11, 2022

In the succeeded email notification I receive:

Monitor http on servidor succeeded!
Recovered at: 2022-03-05 06:35:53+00:00
Additional info: 200 in 0.08s

Feature request: to write how long it was down.

@jamesoff
Copy link
Owner

This used to be included until I broke the code :) but I do remember I was working on fixing it... I must have a branch somewhere with the changes on so I'll see about finishing it and merging it!

@cpina
Copy link
Contributor Author

cpina commented Mar 11, 2022

Ha! I recently updated my server (including simplemonitor) and I see that preivously:

Monitor fibracat-ping on host servidor64 is back up.
Originally failed at: 2022-02-16 23:09:55
Downtime: 0+00:07:11
Description: checking host xxxx is pingable

I had thought that I had seen it and then I thought that perhaps it was another monitoring system that I use :)
I'll update my simplemonitor when it's fixed then.
Thanks!

@jamesoff
Copy link
Owner

I had a look and the code is already merged to the develop branch but not yet in a proper release.

@cpina
Copy link
Contributor Author

cpina commented Mar 23, 2022

Thanks! - do you have a favourite way to use the develop branch? I've tried quickly with pip install -e [email protected]:jamesoff/simplemonitor.git@develop#egg=simplemonitor and alike with no luck. I think that in the past there was requirements.txt that I had used for quickly using a specific branch :-)

Otherwise I will try to try again in the evening...

@jamesoff
Copy link
Owner

That should work. Make sure you're on a recent pip, and you (on recent pips) need to change the URL to git+https (or similar), but I just tested in a fresh venv and this worked ok:

pip install -e 'git+https://github.com/jamesoff/simplemonitor.git@develop#egg=simplemonitor'

That's with Python 3.9.4 and pip 22.0.4 (which I upgraded inside the venv before installing simplemonitor; the supplied one was 20.x, and fails to install the cryptography package).

@cpina
Copy link
Contributor Author

cpina commented Mar 23, 2022

Confirmed, with pip 22.0.4 and the the pip install that you shared it's up and running. I will comment if you want when I see a down/up email with the duration :-)

@jamesoff
Copy link
Owner

Yay!

I've spotted a small bug and will push a fix to develop shortly: it's formatting the timestamp incorrectly (I got one which was 0+0:00:60 instead of 0+0:01:00)

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

No branches or pull requests

2 participants