Skip to main content
Discussion ongoing

Get state type from timelines via API

Related products:Infra Monitoring - MonitoringInfra Monitoring - API
  • March 2, 2026
  • 5 replies
  • 27 views

Forum|alt.badge.img+5

Hello,

Would it be possible to get the state type (SOFT/HARD) from the timelines retrieved by API ?

For the endpoint : /monitoring/hosts/{host_id}/services/{service_id}/timeline

We would like to get the field "state_type". It is present in /monitoring/services endpoint.

When a service gets critical, we have every tries in the timeline (also in the web interface). Having the state type would allow us sort each event in the timeline.

5 replies

rchauvel
Centreonian
Forum|alt.badge.img+18
  • Centreonian
  • March 6, 2026
NewDiscussion ongoing

rchauvel
Centreonian
Forum|alt.badge.img+18
  • Centreonian
  • March 6, 2026

You’re right that state is missing from the timeline endpoint. Can you please explain your use case for leveraging this endpoint and in what circumstance the state would be helpful?


Forum|alt.badge.img+5
  • Author
  • Steward **
  • April 15, 2026

Hello,
Sorry for the late answer.
We use this endpoint to fetch the data from Centreon and build KPIs. For example, it would help us determine how many alerts happened to a service for a day without the duplications due to the retries. Currently, we determine that with the n° of the try and the period with the last element but it is not precise information as both parameters can be modified.

Thank you.


lpinsivy
Centreonian
Forum|alt.badge.img+21
  • Centreonian
  • April 15, 2026

HI ​@mikail,

Can you explain in more detail what you mean by "build KPIs"?

Do you want to build something like the “State Breakdowns” table? 

 


Forum|alt.badge.img+5
  • Author
  • Steward **
  • April 15, 2026

Hello ​@lpinsivy ,

Indeed, we would like to build something alike in a third party tool.
This allow us to make the data more modular, for example check the number of alerts in a list of hosts present in two or more hostgroups.