Skip to content

Commit

Permalink
Merge pull request #2855 from rina23q/docs/fix-timestamp-format-in-se…
Browse files Browse the repository at this point in the history
…rvice-monitoring

Update doc: Troubleshooting > Monitoring Service Health
  • Loading branch information
rina23q authored May 3, 2024
2 parents 77257e4 + d743828 commit c85c4ae
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions docs/src/operate/troubleshooting/monitoring-service-health.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@ If the response is not received then most likely the service is down, or not res
For example, `tedge-mapper-c8y` publishes a message on topic `te/device/main/service/tedge-mapper-c8y/status/health` when it starts:

```json
{ "pid": 290854, "status": "up", "time": "2023-04-02T21:37:12.345678901Z" }
{ "pid": 290854, "status": "up", "time": 1714676361.3610663 }
```

<!-- TODO: this should be in a reference about health status messages -->

| Property | Description |
|----------|----------------------------------------------------|
| `pid` | Process ID of the service |
| `status` | Service status. Possible values are `up` or `down` |
| `time` | Timestamp in RFC3339 format |
| Property | Description |
|----------|------------------------------------------------------------------------------------------------------------------|
| `pid` | Process ID of the service |
| `status` | Service status. Possible values are `up` or `down` |
| `time` | Timestamp in either Unix or RFC-3339 format. Configurable by the tedge config setting `service.timestamp_format` |

If the tedge service gets stopped, crashed, or killed, then a `down` message will be published on health status topic
and this will be retained until the service is restarted.
Expand All @@ -52,7 +52,7 @@ tedge mqtt sub 'te/+/+/+/+/status/health'
INFO: Connected
[te/device/main/service/mosquitto-c8y-bridge/status/health] 1
[te/device/main/service/tedge-mapper-c8y/status/health] {"pid":51367,"status":"down"}
[te/device/main/service/tedge-agent/status/health] {"pid":13280,"status":"up","time":"2023-02-02T09:37:47+00:00"}
[te/device/main/service/tedge-agent/status/health] {"pid":13280,"status":"up","time":1714676361.3610663}
```
## Supported MQTT health endpoint topics

Expand Down

0 comments on commit c85c4ae

Please sign in to comment.