Skip to content

Commit

Permalink
Clarify agent health reporting (#137)
Browse files Browse the repository at this point in the history
Resolves #136

- Renamed `up` to `healthy`.
- `start_time_unix_nano` is no longer tied to `up` and is set independently.
  • Loading branch information
tigrannajaryan authored Nov 9, 2022
1 parent 57de221 commit ac8269a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions proto/opamp.proto
Original file line number Diff line number Diff line change
Expand Up @@ -555,16 +555,16 @@ enum AgentCapabilities {

// The health of the Agent.
message AgentHealth {
// Set to true if the Agent is up and running.
bool up = 1;
// Set to true if the Agent is up and healthy.
bool healthy = 1;

// Timestamp since the Agent is up, i.e. when the agent was started.
// Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
// If "up" is false this field is unused.
// If the agent is not running MUST be set to 0.
fixed64 start_time_unix_nano = 2;

// Human-readable error message if the Agent is in erroneous state. Typically set
// when up==false.
// Human-readable error message if the Agent is in erroneous state. SHOULD be set
// when healthy==false.
string last_error = 3;
}

Expand Down
14 changes: 7 additions & 7 deletions specification.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Note: this document requires a simplification pass to reduce the scope, size and
- [AgentDescription.identifying_attributes](#agentdescriptionidentifying_attributes)
- [AgentDescription.non_identifying_attributes](#agentdescriptionnon_identifying_attributes)
+ [AgentHealth Message](#agenthealth-message)
- [AgentHealth.up](#agenthealthup)
- [AgentHealth.healthy](#agenthealthhealthy)
- [AgentHealth.start_time_unix_nano](#agenthealthstart_time_unix_nano)
- [AgentHealth.last_error](#agenthealthlast_error)
+ [EffectiveConfig Message](#effectiveconfig-message)
Expand Down Expand Up @@ -1031,26 +1031,26 @@ The AgentHealth message has the following structure:

```protobuf
message AgentHealth {
bool up = 1;
bool healthy = 1;
fixed64 start_time_unix_nano = 2;
string last_error = 3;
}
```

#### AgentHealth.up
#### AgentHealth.healthy

Set to true if the Agent is up and running.
Set to true if the Agent is up and healthy.

#### AgentHealth.start_time_unix_nano

Timestamp since the Agent is up, i.e. when the agent was started.
Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
If "up" is false this field is unused.
If the agent is not running MUST be set to 0.

#### AgentHealth.last_error

Human-readable error message if the Agent is in erroneous state. Typically set
when up==false.
Human-readable error message if the Agent is in erroneous state. SHOULD be set
when healthy==false.

### EffectiveConfig Message

Expand Down

0 comments on commit ac8269a

Please sign in to comment.