NextcloudTalk Satellite#

Name

NextcloudTalk

Description

Satellite sending log messages to Nextcloud Talk

Category

Monitoring

Language

C++

Description#

This satellite listens to log messages sent by other satellites and sends them to a Nextcloud Talk chat. Log messages with a log level of WARNING and CRITICAL are prefixed with @all to notify all users in the chat. In addition to logging from other satellites, messages are sent when a run is started, stopped or interrupted.

When sending the message to Nextcloud Talk fails temporarily, the sending is retried a configurable number of times with a quadratically increasing back-off time between the trials.

Building#

This satellite requires cpr, which is downloaded on demand. The satellite is not build by default, building can be enabled via:

meson configure build -Dsatellite_nextcloud_talk=true

Parameters#

Parameter

Description

Type

Default Value

host

URL of the Nextcloud instance

string

-

chat_id

ID of the target chat, for example n4cwk7bk. This can be found as last part of the URL when opening the chat in the browser

string

-

account

Account name of the user to connect with

string

-

app_password

App password of the account to be used, for example SLyPa-oTfTc-57zTn-QlPsZ-91PW7

string

-

log_level

Minimum log level of the logger

string

WARNING

subscribe_topics

Section with individual log topics and the respective subscription log level.

Section

{OP: INFO}

ignore_topics

Ignore log messages with certain topics

list of strings

[FSM]

only_in_run

Only log to Nextcloud Talk in the RUN, interrupting or SAFE state

bool

false

max_retries

Number of retries for sending a message to Nextcloud Talk

Integer

5

backoff_time

Initial time in milliseconds for the back-off between retrying to send messages

Integer

500

The subscribe_topics section can be used to change the subscription levels of individual topics beyond the global log_level setting. For example the OP topic logging operator actions will be subscribed to on INFO log level by default. Other topics can be added similarly:

Nextcloud:
  Logger:
    subscribe_topics:
      OP: "INFO"
      CTRL: "DEBUG"

The parameters ignore_topics and subscribe_topics are mutually exclusive, and a log topic can only appear in one of them.

Framework Parameters#

This satellite interprets the following configuration parameter that are provided through the Constellation framework. Parameters have to be placed in their respective configuration section.

Autonomous Operation#

Parameters to control autonomy in the _autonomy section:

Parameter

Type

Description

Default Value

role

Role name

Role this satellite should take in the Constellation. Accepted values are ESSENTIAL, DYNAMIC, TRANSIENT and NONE.

DYNAMIC

max_heartbeat_interval

Unsigned integer

Maximum interval in seconds between heartbeats to be sent to other Constellation components. The time between heartbeat is adjusted automatically according to the number of nodes in the Constellation but will never exceed this value.

30

Conditional Transitions#

Parameters to control conditional transitions in the _conditions section:

Parameter

Type

Description

Default Value

require_initializing_after

List of strings

List of canonical names of remote satellites for conditional transitioning in initializing state

-

require_launching_after

List of strings

List of canonical names of remote satellites for conditional transitioning in launching state

-

require_landing_after

List of strings

List of canonical names of remote satellites for conditional transitioning in landing state

-

require_starting_after

List of strings

List of canonical names of remote satellites for conditional transitioning in starting state

-

require_stopping_after

List of strings

List of canonical names of remote satellites for conditional transitioning in stopping state

-

transition_timeout

Unsigned integer

Timeout in seconds to wait for all conditions to be satisfied for conditional transitioning

30

Framework Metrics#

This satellite provides the following metrics that are defined by the Constellation framework.

Basic Satellite Metrics#

Metric

Description

Value Type

Interval

RUN_ID

Current run identifier. Updated whenever it changes.

String

-

STATE

Current satellite state. Updated when changed.

String

-

CPU_LOAD_AVG

CPU load average over the past 1 minute, provided in percent.

Float

10s

MEM_AVAIL

Available memory in Megabytes.

Integer

10s