add "series" event parameters when pinging cronitor hook #592

Closed
opened 2022-10-04 10:01:49 +00:00 by xLogiiCx · 6 comments

What I'm trying to do and why

i noticed, that for each mode bormatic runs (prune, compact, create etc.) it sends a single ping to cronitor.
it would be a great addition if you also could add the "series" event parameter. it would improve the clarity enormously

Expected behavior

when sending a single ping to cronitor add the current running mode (prune,compact,create etc) as a "series" event parameter in the request.
e.g

curl https://cronitor.link/p/e981f5ece0f948e8be3e05abdb4cf3f8/nightly-job?state=run&series=prune

in my opinion the best way would be to be able to addd a custom "series" and add a variable which contains the current borg mode.

Environment

borgmatic version: 1.7.2

borgmatic installation method: aur

Borg version: 1.2.2

Python version: Python 3.10.7

operating system and version: Linux 5.19.12-arch1-1 x86_64

#### What I'm trying to do and why i noticed, that for each mode bormatic runs (prune, compact, create etc.) it sends a single ping to cronitor. it would be a great addition if you also could add the "series" [event parameter](https://cronitor.io/docs/telemetry-api#parameters). it would improve the clarity enormously #### Expected behavior when sending a single ping to cronitor add the current running mode (prune,compact,create etc) as a "series" event parameter in the request. e.g ``` curl https://cronitor.link/p/e981f5ece0f948e8be3e05abdb4cf3f8/nightly-job?state=run&series=prune ``` in my opinion the best way would be to be able to addd a custom "series" and add a variable which contains the current borg mode. #### Environment **borgmatic version:** 1.7.2 **borgmatic installation method:** aur **Borg version:** 1.2.2 **Python version:** Python 3.10.7 **operating system and version:** Linux 5.19.12-arch1-1 x86_64
Owner

Interesting! I didn't know Cronitor supported this. Would this series support be preferable to a feature like #518 (separate ping URLs per borgmatic action)? Or would you potentially take advantage of both?

Interesting! I didn't know Cronitor supported this. Would this `series` support be preferable to a feature like #518 (separate ping URLs per borgmatic action)? Or would you potentially take advantage of both?
Author

I like both Ideas.

Then you could decide if you use them in a Single Check and keep the different options appart with the "series" support.
Or you could create different task with the #518 Idea to get a better overview of the duration of the single commands for example.

I like both Ideas. Then you could decide if you use them in a Single Check and keep the different options appart with the "series" support. Or you could create different task with the #518 Idea to get a better overview of the duration of the single commands for example.
Owner

That makes sense to me!

That makes sense to me!
Owner

I know this ticket has been languishing a while, but now I have a question on it, assuming this feature is still of interest to you: borgmatic usually runs with multiple actions (e.g. create, prune, etc.), and only pings Cronitor with a single start/finish pair for all of those actions rather than each of them. You can optionally run borgmatic with a single action, but that's not the default. So what would be a useful value for series in the case when multiple actions are being run? Would that even be helpful, or would it defeat the purpose of this proposed feature?

I assume that when you filed this ticket, you were running borgmatic with individual actions, e.g. borgmatic create, borgmatic prune, etc...? And that's why you wanted to be able to distinguish the pings in Cronitor?

I know this ticket has been languishing a while, but now I have a question on it, assuming this feature is still of interest to you: borgmatic usually runs with multiple actions (e.g. `create`, `prune`, etc.), and only pings Cronitor with a single start/finish pair for all of those actions rather than each of them. You *can* optionally run borgmatic with a single action, but that's not the default. So what would be a useful value for `series` in the case when multiple actions are being run? Would that even be helpful, or would it defeat the purpose of this proposed feature? I assume that when you filed this ticket, you were running borgmatic with individual actions, e.g. `borgmatic create`, `borgmatic prune`, etc...? And that's why you wanted to be able to distinguish the pings in Cronitor?
Owner

An alternate proposal: Instead of putting the action(s) into series, borgmatic could just generate a unique ID specific to that borgmatic run and put it into series for both start and finish states. That would allow you to correlate pings within Cronitor even if it doesn't tell you the action(s) run.

An alternate proposal: Instead of putting the action(s) into `series`, borgmatic could just generate a unique ID specific to that borgmatic run and put it into `series` for both start and finish states. That would allow you to correlate pings within Cronitor even if it doesn't tell you the action(s) run.
Owner

I'm closing this now due to inactivity, but I can certainly reopen it if you have feedback on the points above. Thank you!

I'm closing this now due to inactivity, but I can certainly reopen it if you have feedback on the points above. Thank you!
Sign in to join this conversation.
No milestone
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
borgmatic-collective/borgmatic#592
No description provided.