Skip to main content
Question

Curl command timezone for downtime

  • Nov 10, 2022 1:54 PM UTC
  • 5 replies
  • 185 views

Forum|alt.badge.img+1

Hello,

 

i created a command notification for the downtime that will send to Status Page with command curl but i need a code for the time zone.

"Incident[scheduled_for]=2022-07-07T17:035:00.007Z"

 

it doesn’t work with past time.

Have any help?

 

Best regards,

SLU

5 replies

ponchoh
Centreonian
Forum|alt.badge.img+14
  • Centreonian
  • Nov 10, 2022 9:53 PM UTC

👋

@SLU 

 

do you mean this?

 

[`date +%s`]


Forum|alt.badge.img+1
  • Author
  • Steward *
  • Nov 11, 2022 3:44 PM UTC

Hello,

 

Thank’s for the reply.

I’m not quite sure but i will try it 


Forum|alt.badge.img+1
  • Author
  • Steward *
  • Nov 11, 2022 3:49 PM UTC

the full command : "incident[scheduled_for]=2022-07-07T17:035:00.007Z" -d "incident[scheduled_until]=2022-07-07T17:040:00.007Z"

 

need the code for Start time and End time in the downtime


ponchoh
Centreonian
Forum|alt.badge.img+14
  • Centreonian
  • Nov 11, 2022 4:05 PM UTC

ponchoh
Centreonian
Forum|alt.badge.img+14
  • Centreonian
  • Nov 11, 2022 4:07 PM UTC

Have you leverage the API?

 

https://docs.centreon.com/docs/api/clapi/#downtimes

https://docs-api.centreon.com/api/centreon-web/#tag/Downtime/paths/~1monitoring~1hosts~1%7Bhost_id%7D~1services~1%7Bservice_id%7D~1downtimes/post