[heroes] api for status.opensuse.org?
Hi, Looking at the upstream cachet documentation there seems to be api support to automate updating the status of services. What needs to be done to get a token there and hook up services? cu Ludwig -- (o_ Ludwig Nussel //\ V_/_ http://www.suse.com/ SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) -- To unsubscribe, e-mail: heroes+unsubscribe@opensuse.org To contact the owner, e-mail: heroes+owner@opensuse.org
Hello, Am Donnerstag, 23. August 2018, 09:58:38 CEST schrieb Ludwig Nussel:
Looking at the upstream cachet documentation there seems to be api support to automate updating the status of services. What needs to be done to get a token there and hook up services?
I have to admit that I never played with the API, so I can only give you some pointers: A good starting point is having an account on status.o.o. I took your mail as a request for that ;-) and just sent you an invitation. http://status.opensuse.org/dashboard/user shows your API token. (Obviously you have to be logged in.) https://docs.cachethq.io/docs/api-authentication explains how to authentificate with that token. Unfortunately the API documentation is either not existing or well hidden from the documentation. Instead, I'll point you to client libraries https://docs.cachethq.io/docs/client-libraries - either use one of them, or look at the source code to understand the API ;-) Regards, Christian Boltz --
Why not just make it configurable (/etc/sysconfig/something) with a sane default? "/etc/sysconfig" and "sane" do not go in the same sentence [> Jon Nelson and Cristian Rodríguez in opensuse-factory]
-- To unsubscribe, e-mail: heroes+unsubscribe@opensuse.org To contact the owner, e-mail: heroes+owner@opensuse.org
Hello, Am Donnerstag, 23. August 2018, 17:49:33 CEST schrieb Christian Boltz:
Unfortunately the API documentation is either not existing or well hidden from the documentation.
Good news - I have to correct myself on this ;-) https://docs.cachethq.io/reference has all the API details :-) Regards, Christian Boltz -- For a while I thought that it may be fixable, but then I looked into the source: a 400 line function in Perl. With a goto. [Martin Vidner on https://github.com/yast/yast-registration/pull/244/commits/ 64eb11b9b403d163ab0400adf0ed7692e9f3bb1b] -- To unsubscribe, e-mail: heroes+unsubscribe@opensuse.org To contact the owner, e-mail: heroes+owner@opensuse.org
Christian Boltz wrote:
Hello,
Am Donnerstag, 23. August 2018, 09:58:38 CEST schrieb Ludwig Nussel:
Looking at the upstream cachet documentation there seems to be api support to automate updating the status of services. What needs to be done to get a token there and hook up services?
I have to admit that I never played with the API, so I can only give you some pointers:
A good starting point is having an account on status.o.o. I took your mail as a request for that ;-) and just sent you an invitation.
Thanks! I tested cachet-url-monitor with software.opensuse.org. Unfortunately caused some spam as I didn't notice it was too aggressive changing status and even creating incidents :-( Sorry for that! So maybe that is a way to get status.o.o to warn interested parties in time if something bad happens. The config I use for software.o.o is this one: endpoint: url: http://software.opensuse.org/ method: GET timeout: 5 expectation: - type: HTTP_STATUS status_range: 200-300 - type: LATENCY threshold: 1 - type: REGEX regex: '.*(<body).*' allowed_fails: 5 cachet: api_url: https://status.opensuse.org/api/v1 token: YOURTOKEN component_id: 5 metric_id: 2 action: #- CREATE_INCIDENT - UPDATE_STATUS public_incidents: false frequency: 30 latency_unit: ms Obviously the service would need to run somehwere else than my workstation to be useful. I've switched the test run off now to avoid further havoc :-) Anyways, the monitor is basically working. I made a package here: https://build.opensuse.org/package/show/home:lnussel/python-cachet-url-monit... Feel free to take if it's useful. cu Ludwig PS: Looks like Cachet is packaged in Lars' home. I guess the canonical location for something that is deployed on openSUSE infrastructure should be somewhere else :-) -- (o_ Ludwig Nussel //\ V_/_ http://www.suse.com/ SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) -- To unsubscribe, e-mail: heroes+unsubscribe@opensuse.org To contact the owner, e-mail: heroes+owner@opensuse.org
Gesendet: Freitag, 24. August 2018 um 16:27 Uhr Von: "Ludwig Nussel" <ludwig.nussel@suse.de> An: heroes@opensuse.org Betreff: Re: [heroes] api for status.opensuse.org?
Christian Boltz wrote:
Hello,
Am Donnerstag, 23. August 2018, 09:58:38 CEST schrieb Ludwig Nussel:
Looking at the upstream cachet documentation there seems to be api support to automate updating the status of services. What needs to be done to get a token there and hook up services?
I have to admit that I never played with the API, so I can only give you some pointers:
A good starting point is having an account on status.o.o. I took your mail as a request for that ;-) and just sent you an invitation. [..]
Obviously the service would need to run somehwere else than my workstation to be useful. I've switched the test run off now to avoid further havoc :-)
Anyways, the monitor is basically working. I made a package here: https://build.opensuse.org/package/show/home:lnussel/python-cachet-url-monit...
Feel free to take if it's useful.
cu Ludwig
PS: Looks like Cachet is packaged in Lars' home. I guess the canonical location for something that is deployed on openSUSE infrastructure should be somewhere else :-)
That has his reason. Lars was the guy who wanted to test status.opensuse.org and did the setup. :-) Best regards, Sarah
-- (o_ Ludwig Nussel //\ V_/_ http://www.suse.com/ SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) -- To unsubscribe, e-mail: heroes+unsubscribe@opensuse.org To contact the owner, e-mail: heroes+owner@opensuse.org
-- To unsubscribe, e-mail: heroes+unsubscribe@opensuse.org To contact the owner, e-mail: heroes+owner@opensuse.org
Ludwig Nussel wrote:
Christian Boltz wrote:
Am Donnerstag, 23. August 2018, 09:58:38 CEST schrieb Ludwig Nussel:
Looking at the upstream cachet documentation there seems to be api support to automate updating the status of services. What needs to be done to get a token there and hook up services?
I have to admit that I never played with the API, so I can only give you some pointers:
A good starting point is having an account on status.o.o. I took your mail as a request for that ;-) and just sent you an invitation.
Thanks! I tested cachet-url-monitor with software.opensuse.org. [...] Anyways, the monitor is basically working. I made a package here: https://build.opensuse.org/package/show/home:lnussel/python-cachet-url-monit...
I filed https://build.opensuse.org/request/show/632089 for openSUSE:infrastructure. Can we maybe run that directly on status.o.o. It could monitor other http web sites as well. cu Ludwig -- (o_ Ludwig Nussel //\ V_/_ http://www.suse.com/ SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) -- To unsubscribe, e-mail: heroes+unsubscribe@opensuse.org To contact the owner, e-mail: heroes+owner@opensuse.org
On Wed, Aug 29, 2018 at 01:20:39PM +0200, Ludwig Nussel wrote:
Ludwig Nussel wrote:
Christian Boltz wrote:
Am Donnerstag, 23. August 2018, 09:58:38 CEST schrieb Ludwig Nussel:
Looking at the upstream cachet documentation there seems to be api support to automate updating the status of services. What needs to be done to get a token there and hook up services?
I have to admit that I never played with the API, so I can only give you some pointers:
A good starting point is having an account on status.o.o. I took your mail as a request for that ;-) and just sent you an invitation.
Thanks! I tested cachet-url-monitor with software.opensuse.org. [...] Anyways, the monitor is basically working. I made a package here: https://build.opensuse.org/package/show/home:lnussel/python-cachet-url-monit...
I filed https://build.opensuse.org/request/show/632089 for openSUSE:infrastructure. Can we maybe run that directly on status.o.o. It could monitor other http web sites as well.
I took a quick look, the package is unresolvable for leap 42.3. Instead of fixing the package, I would suggest though to upgrade status.o.o to leap 15.0. We have the status2.o.o VM in provo that can be used for testing if the upgrade will be smooth. Any volunteers to handle it? Theo
participants (4)
-
Christian Boltz
-
Ludwig Nussel
-
Sarah-Julia Kriesch
-
Theo Chatzimichos