downtime endtime via API?

19 views
Skip to first unread message

Karl Harris

unread,
Jul 5, 2016, 4:47:27 PM7/5/16
to adagios
I am using the API to set the downtime on a host or services however I would like to also use the API to get the downtime endtime so I can display how many minutes are left on the downtime.

Is there any API call that will supply this information?

Thanks


Páll Sigurðsson

unread,
Jul 7, 2016, 11:48:59 AM7/7/16
to adagios
Seems we don't have one (weird, I was sure we did).

It should be trivial to implement though.

Can you try adding a new function into adagios/status/rest.py with something like the following:
"""
  def get_downtimes(request, **kwargs):
    l = adagios.status.utils.livestatus(request)
    args = pynag.Utils.grep_to_livestatus(**kwargs)
    return l.query('GET downtimes', *args)
"""

--
You received this message because you are subscribed to the Google Groups "adagios" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adagios+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages