DataDog / datadogpy

The Datadog Python library
https://datadoghq.com/
Other
612 stars 302 forks source link

DowntimesApi: canceled downtime still visible in response of list_downtimes() #757

Closed mseidl-sipfront closed 1 year ago

mseidl-sipfront commented 1 year ago

Describe the bug I created a downtime manually, to test DowntimesAPI.

list_downtimes works fine, however, after cancel_downtime(id), response is empty and the downtime is still visible when calling list_downtimes(), but not shown on the UI/Webpage.

To Reproduce Steps to reproduce the behavior:

  1. Create a Downtime in the future (I used 2024)
  2. Via datadogpy, cancel_downtime with id provided with list_downtimes()
  3. Response is empty, list_downtimes() still showing the manually created downtime. But it's not visible on the webpage / UI.

Expected behavior After calling cancel_downtime(id), list_downtimes() should NOT show the canceled downtime.

therve commented 1 year ago

Hi,

In datadog-api-client, if you pass current_only=True you won't get soft-deleted downtimes returned: https://datadog-api-client.readthedocs.io/en/latest/datadog_api_client.v1.api.html#datadog_api_client.v1.api.downtimes_api.DowntimesApi.list_downtimes. Can you check if that works for you? Thanks.

mseidl-sipfront commented 1 year ago

Hi Thomas,

So current_only=False returns ALL downtimes, even disabled/deleted ones?

current_only=True does not return downtimes in the future, just current, active downtimes, right?

Is there a chance to see all downtimes which are either active or in the future?

Thanks in advance.

BR Markus

On Mon, Feb 20, 2023 at 3:00 PM Thomas Hervé @.***> wrote:

Hi,

In datadog-api-client, if you pass current_only=True you won't get soft-deleted downtimes returned: https://datadog-api-client.readthedocs.io/en/latest/datadog_api_client.v1.api.html#datadog_api_client.v1.api.downtimes_api.DowntimesApi.list_downtimes. Can you check if that works for you? Thanks.

— Reply to this email directly, view it on GitHub https://github.com/DataDog/datadogpy/issues/757#issuecomment-1437067237, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASOG4ONHM5XC5ZK4D3NLOSLWYN2HFANCNFSM6AAAAAAVB4YH5Q . You are receiving this because you authored the thread.Message ID: @.***>

-- CTO Sipfront GmbH e: @.*** Kraelitzgasse 6 t: +43 650 92 12 782 1130 Vienna, Austria w: www.sipfront.com FN: 542495 m, FG: HG Wien

mseidl-sipfront commented 1 year ago

Got it, disabled flag is set to true.

How long will these disabled Downtimes linger around?

thanks and BR Markus

On Mon, Feb 20, 2023 at 3:12 PM Markus Seidl @.***> wrote:

Hi Thomas,

So current_only=False returns ALL downtimes, even disabled/deleted ones?

current_only=True does not return downtimes in the future, just current, active downtimes, right?

Is there a chance to see all downtimes which are either active or in the future?

Thanks in advance.

BR Markus

On Mon, Feb 20, 2023 at 3:00 PM Thomas Hervé @.***> wrote:

Hi,

In datadog-api-client, if you pass current_only=True you won't get soft-deleted downtimes returned: https://datadog-api-client.readthedocs.io/en/latest/datadog_api_client.v1.api.html#datadog_api_client.v1.api.downtimes_api.DowntimesApi.list_downtimes. Can you check if that works for you? Thanks.

— Reply to this email directly, view it on GitHub https://github.com/DataDog/datadogpy/issues/757#issuecomment-1437067237, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASOG4ONHM5XC5ZK4D3NLOSLWYN2HFANCNFSM6AAAAAAVB4YH5Q . You are receiving this because you authored the thread.Message ID: @.***>

-- CTO Sipfront GmbH e: @.*** Kraelitzgasse 6 t: +43 650 92 12 782 1130 Vienna, Austria w: www.sipfront.com FN: 542495 m, FG: HG Wien

-- CTO Sipfront GmbH e: @.*** Kraelitzgasse 6 t: +43 650 92 12 782 1130 Vienna, Austria w: www.sipfront.com FN: 542495 m, FG: HG Wien

therve commented 1 year ago

Sorry I don't know. Can you contact support? Thank you.

mseidl-sipfront commented 1 year ago

Alright. Thank you. Everything is ok.

I got my answers.

BR Markus

Thomas Hervé @.***> schrieb am Mi., 22. Feb. 2023, 21:26:

Sorry I don't know. Can you contact support? Thank you.

— Reply to this email directly, view it on GitHub https://github.com/DataDog/datadogpy/issues/757#issuecomment-1440752957, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASOG4OO4MMGD5POQNSBQFXLWYZY7ZANCNFSM6AAAAAAVB4YH5Q . You are receiving this because you authored the thread.Message ID: @.***>