mirror of
https://github.com/netdata/netdata.git
synced 2025-04-22 20:42:33 +00:00
Return rc->last_update from alarms_values api (#12968)
* add rc last_update as when in alarms values api * rename when to last_updated * update swagger
This commit is contained in:
parent
2f4b6e059b
commit
546010acad
3 changed files with 13 additions and 2 deletions
|
@ -165,6 +165,10 @@ static inline void health_rrdcalc_values2json_nolock(RRDHOST *host, BUFFER *wb,
|
|||
buffer_rrd_value(wb, rc->value);
|
||||
buffer_strcat(wb, ",\n");
|
||||
|
||||
buffer_strcat(wb, "\t\t\t\"last_updated\":");
|
||||
buffer_sprintf(wb, "%lu", (unsigned long)rc->last_updated);
|
||||
buffer_strcat(wb, ",\n");
|
||||
|
||||
buffer_sprintf(wb,
|
||||
"\t\t\t\"status\": \"%s\"\n"
|
||||
, rrdcalc_status2string(rc->status));
|
||||
|
|
|
@ -908,7 +908,7 @@
|
|||
"/alarms_values": {
|
||||
"get": {
|
||||
"summary": "Get a list of active or raised alarms on the server",
|
||||
"description": "The alarms_values endpoint returns the list of all raised or enabled alarms on the netdata server. Called without any parameters, the raised alarms in state WARNING or CRITICAL are returned. By passing \"?all\", all the enabled alarms are returned. This option output differs from `/alarms` in the number of variables delivered. This endpoint gives to user `id`, `value` and alarm `status`.",
|
||||
"description": "The alarms_values endpoint returns the list of all raised or enabled alarms on the netdata server. Called without any parameters, the raised alarms in state WARNING or CRITICAL are returned. By passing \"?all\", all the enabled alarms are returned. This option output differs from `/alarms` in the number of variables delivered. This endpoint gives to user `id`, `value`, `last_updated` time and alarm `status`.",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "all",
|
||||
|
@ -2109,6 +2109,10 @@
|
|||
"value": {
|
||||
"type": "integer"
|
||||
},
|
||||
"last_updated": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
|
|
|
@ -745,7 +745,7 @@ paths:
|
|||
state WARNING or CRITICAL are returned. By passing "?all", all the
|
||||
enabled alarms are returned.
|
||||
This option output differs from `/alarms` in the number of variables delivered. This endpoint gives
|
||||
to user `id`, `value` and alarm `status`.
|
||||
to user `id`, `value`, `last_updated` time, and alarm `status`.
|
||||
parameters:
|
||||
- name: all
|
||||
in: query
|
||||
|
@ -1650,6 +1650,9 @@ components:
|
|||
type: integer
|
||||
value:
|
||||
type: integer
|
||||
last_updated:
|
||||
type: integer
|
||||
format: int32
|
||||
status:
|
||||
type: string
|
||||
enum:
|
||||
|
|
Loading…
Add table
Reference in a new issue