-
Notifications
You must be signed in to change notification settings - Fork 382
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
Exporting metrics and check statuses to Prometheus #317
Comments
you can push data via a webhook upon success or failure, you would need a proxy software to convert that to the format prometheus uses |
Although not documented, Cronicle does have an HTTP REST API for fetching metrics about all completed jobs in JSON format. I have no idea what data format Prometheus / Grafana use, but you could possibly use this as a starting point, and write a converter script or something. The URI endpoint is:
Make sure you create an API Key first, then use that in the URL above where it says Example JSON response: {
"code": 0,
"rows": [
{
"id": "jkd6rar2iog",
"code": 0,
"event": "ek0bnmr96hm",
"category": "general",
"plugin": "urlplug",
"hostname": "mini.local",
"time_start": 1595990100.618,
"elapsed": 0.3429999351501465,
"perf": {
"scale": 1000,
"perf": {
"total": 227.237,
"dns": 68.96,
"connect": 24.828,
"send": 52.286,
"wait": 73.618,
"receive": 1.224,
"decompress": 2.509
},
"counters": {
"bytes_sent": 154,
"bytes_received": 443
}
},
"cpu": {},
"mem": {},
"log_file_size": 994,
"action": "job_complete",
"epoch": 1595990100,
"event_title": "EMR Auto-Upload",
"category_title": "General",
"plugin_title": "HTTP Request"
},
{
"id": "jkd6r4buzof",
"code": 0,
"event": "ejs9m57bw01",
"category": "general",
"plugin": "urlplug",
"hostname": "mini.local",
"time_start": 1595989800.971,
"elapsed": 0.5130000114440918,
"perf": {
"scale": 1000,
"perf": {
"total": 397.582,
"dns": 69.316,
"connect": 25.463,
"send": 53.506,
"wait": 241.533,
"receive": 1.244,
"decompress": 2.54
},
"counters": {
"bytes_sent": 172,
"bytes_received": 567
}
},
"cpu": {},
"mem": {},
"log_file_size": 1150,
"action": "job_complete",
"epoch": 1595989801,
"event_title": "AMR Auto-Upload",
"category_title": "General",
"plugin_title": "HTTP Request"
},
...
] Each item in the Good luck! |
Thanks. That is what I am looking for. |
Is there a way to push metrics and statuses to Prometheus so that I can also visualize on Grafana?
Thanks.
The text was updated successfully, but these errors were encountered: