Skip to content
Hosts

Hosts

Add a Linux, Windows or macOS machine to Status200 with one command. The command installs the OpenTelemetry Collector on the host, and Status200 sends the collector its config and keeps it up to date: there is no config.yaml to write, copy to each host or keep in step. To change what your hosts collect, edit a Collector Config once, and every host it applies to gets the change within a minute.

How it works

The command installs two programs from the OpenTelemetry Collector releases, each checked against the SHA-256 its release publishes: otelcol-contrib, the collector that reads the host, and opampsupervisor, which runs the collector and keeps it on the config Status200 sends over OpAMP, the OpenTelemetry Agent Management Protocol. Both run as the service status200-collector.

flowchart TB command["The install command<br/>on the host"] --> supervisor["opampsupervisor"] supervisor -->|"asks for its config<br/>every 30 seconds"| oneuptime["Status200"] oneuptime -->|"the config<br/>the host runs"| supervisor supervisor --> collector["otelcol-contrib"] collector -->|"OTLP over HTTPS"| oneuptime

One command, then Status200 keeps the host configured

The supervisor asks Status200 for the host's config about every 30 seconds, with your ingestion key, and reports which config the host runs and whether it started. The host registers under Hosts when the supervisor first connects, named after its hostname, and its pages fill in as its metrics and logs arrive.

Each host runs one config, chosen in this order:

The host runsWhen
The config picked for it on its Collector pageSomeone picked one.
The first of the Collector Configs that applies to itA config applies when it is for the host's system and, if it names labels, the host has one of them.
Status200's default for its systemNo config applies.

Status200's default reads CPU, memory, disks, filesystems, network and processes on every system; the journal and systemd units on Linux, where the host has them; the System, Application and Security event logs and Windows services on Windows; and the install and Wi-Fi logs in /var/log on macOS. It follows Status200's releases, so a host on the default gets Status200's improvements to it.

Before you begin

  • An ingestion key. Add Host creates one for you, or pick one you made under Project Settings → Telemetry & APM → Ingestion Keys.
  • Administrator rights on the host: sudo on Linux and macOS, PowerShell run as administrator on Windows.
  • Linux with systemd, Windows 10 or Windows Server 2019 and later, or macOS on Apple silicon or Intel.
  • Outbound HTTPS from the host to your Status200 URL, directly or through a proxy.

Add a host

  1. Open Add Host

    Open Products → Infrastructure → Hosts and select Add Host. Pick what the host runs: Linux, Windows or macOS. A Kubernetes cluster's nodes are monitored by the Kubernetes Agent instead.

  2. Pick an ingestion key

    Pick a key, or create one from the dialog. The command below fills it in.

  3. Run the command on the host

    Copy the command from the dialog and run it on the host. It takes about a minute. These are the same commands, with your Status200 URL and key in place of the examples:

    Linux

    Bash
    curl -fsSL https://status200.ru/docs/static/scripts/host-collector/install.sh | sudo sh -s -- --url https://status200.ru --key YOUR_INGESTION_KEY

    macOS

    Bash
    curl -fsSL https://status200.ru/docs/static/scripts/host-collector/install.sh | sudo sh -s -- --url https://status200.ru --key YOUR_INGESTION_KEY

    Windows

    PowerShell
    [Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12; & ([scriptblock]::Create((Invoke-RestMethod -Uri 'https://status200.ru/docs/static/scripts/host-collector/install.ps1'))) -Url 'https://status200.ru' -Key 'YOUR_INGESTION_KEY'

    Every Status200 serves its own installers, so a self-hosted Status200 hands out the installer of its own release: replace https://status200.ru with your URL in both places.

  4. Wait for the host

    The dialog's last step says when the host connects, with a link to it. In the list it shows as Starting until its first metrics arrive, usually within a minute, then as connected, with its collector Running. The host's Topology page draws what runs on it, what calls it and what it calls as one map: see Topology.

Label hosts

Add labels to the command, and the host has them from the moment it connects:

Linux

Bash
curl -fsSL https://status200.ru/docs/static/scripts/host-collector/install.sh | sudo sh -s -- --url https://status200.ru --key YOUR_INGESTION_KEY --label env=production --label team=payments

macOS

Bash
curl -fsSL https://status200.ru/docs/static/scripts/host-collector/install.sh | sudo sh -s -- --url https://status200.ru --key YOUR_INGESTION_KEY --label env=production --label team=payments

Windows

PowerShell
[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12; & ([scriptblock]::Create((Invoke-RestMethod -Uri 'https://status200.ru/docs/static/scripts/host-collector/install.ps1'))) -Url 'https://status200.ru' -Key 'YOUR_INGESTION_KEY' -Label 'env=production','team=payments'

env=production becomes the label env:production. Labels are added, never taken off: run the command again with another label and the host has both. You can also label hosts on the Hosts list or with Label Rules. A Collector Config that names labels is only for hosts with one of them, so the same command with different labels gives each group of hosts its own config.

Change what hosts collect

  1. Create a Collector Config

    Open Products → Infrastructure → Hosts → Collector Configs and select Create Collector Config. Give it a name, the system of the hosts it is for, and, to reach only some of them, their labels. Its config starts as Status200's default for that system.

  2. Edit its config.yaml

    On the config's page, select Edit config, change the YAML and save. Status200 checks it first and refuses a config it cannot send, saying why: see What a config may do.

  3. Watch it reach the hosts

    Every saved change is a new version, and the hosts it applies to get it within a minute. The config's Hosts list shows each host, its collector's state and the version it runs.

A host runs the first config in the list that applies to it: drag the rows on Collector Configs to change the order. Put the narrowest configs first, such as one for env:production web servers, and broad ones, such as one for every Linux host, after them. The Status200 defaults card under the list shows what a host runs when no config applies.

Versions and Put back

A config's Versions list keeps every saved change, newest first, with who saved it and when. Select View to read a version, and Put back to send it to the hosts again: it is saved as a new version that says which one it put back, so the list always tells what each host was sent.

Pick a config for one host

On a host's Collector page, select Change config and pick a config for this host only. Configs for the host's system and for any system are offered. Pick Automatic to give the host back to the list. A host whose picked config is deleted goes back to the list on its own.

When a config does not start

The supervisor checks a new config with the collector before it switches to it, and goes back to the last config that worked when one does not start. The host keeps sending all along. Its Collector page shows Config failed with the collector's reason, such as a log file the collector may not read, and Status200 does not send that config to the host again until it changes. Once you have fixed the cause on the host, select Try again to send it once more.

What a config may do

A config Status200 sends runs on every host it applies to, so Status200 checks it every time it is saved, and refuses one that breaks a rule:

RuleWhy
Only the receivers, processors, exporters, extensions and connectors on Status200's listIt reads the host and the services on it. A component that runs programs or reads cloud or cluster credentials is not on the list.
Data leaves the host only through the otlp_http exporter, to ${env:STATUS200_URL}/otlp with the header x-status200-token: ${env:STATUS200_INGESTION_KEY}Each host sends to this Status200, with the key it was installed with. No config holds a key.
${env:NAME} is the only ${...} it may useA ${file:...} or ${https:...} would be read on every host and could be sent on.
No setting that runs a program or sends a file it reads, such as journald's journalctl_pathA config may not reach further than reading the host.

A config can still be one a host cannot run, such as a receiver for another system or a log file that does not exist there. The collector on each host checks that before it switches, as When a config does not start describes.

Check on a host's collector

Open the host and its Collector page. It shows where the collector stands, the config it runs and Why this config, the version it runs, its Last report and its Collector release. Under On the host are the commands to check on it from a shell on the host: whether its service runs, its log, and a restart.

Linux

Bash
sudo systemctl status status200-collector
sudo journalctl -u status200-collector -n 50
sudo systemctl restart status200-collector

macOS

Bash
sudo launchctl print system/com.status200.collector
sudo tail -n 50 /usr/local/status200-collector/log/collector.log
sudo launchctl kickstart -k system/com.status200.collector

Windows

PowerShell
Get-Service status200-collector
Get-WinEvent -FilterHashtable @{ LogName = 'Application'; ProviderName = 'status200-collector' } -MaxEvents 50 | Format-List TimeCreated, Message
Restart-Service status200-collector

On Linux the collector runs as the unprivileged user status200-collector, in the systemd-journal and adm groups so it can read the journal and the logs in /var/log. On macOS it runs as root, as launchd daemons do, and on Windows as LocalSystem, so it can read every event log and Windows service.

Hosts set up by hand

A host whose collector you installed yourself, with the Host OpenTelemetry Collector guide, keeps reporting as it did, and Status200 does not send it a config. To hand it over, open the host's Collector page: its command adds --replace-existing, which stops and disables the collector installed by hand (the otelcol-contrib service), so the host does not report twice. The host keeps its name, its history and its labels.

Install options

Run the command again to change any of these, or to move to a newer release: it replaces what it installed and keeps the host as it is in Status200.

Linux and macOSWindowsWhat it does
--url URL-Url URLWhere Status200 is.
--key KEY-Key KEYA telemetry ingestion key of your project.
--label KEY=VALUE-Label KEY=VALUELabels the host. Repeat it for more labels; on Windows, list them with commas.
--env NAME=VALUE-EnvVar NAME=VALUEGives the collector an environment variable, for configs that read ${env:NAME}.
--version VERSION-Version VERSIONThe collector release to install, 0.161.0 by default.
--download-url URL-DownloadUrl URLDownloads the releases from a mirror with the same folder layout as GitHub's.
--proxy URL-Proxy URLSends the downloads and all of the collector's traffic through an HTTP proxy.
--replace-existing-ReplaceExistingStops and disables a collector installed by hand.
--uninstall-UninstallRemoves the collector and everything the command installed.

Uninstall

Linux

Bash
curl -fsSL https://status200.ru/docs/static/scripts/host-collector/install.sh | sudo sh -s -- --uninstall

macOS

Bash
curl -fsSL https://status200.ru/docs/static/scripts/host-collector/install.sh | sudo sh -s -- --uninstall

Windows

PowerShell
& ([scriptblock]::Create((Invoke-RestMethod -Uri 'https://status200.ru/docs/static/scripts/host-collector/install.ps1'))) -Uninstall

The host stays in Status200 with its history: archive or delete it on the Hosts list.

Troubleshooting

The command says Status200 refused the key

HTTP 401: the key is wrong, has expired or was deleted. HTTP 422: it is disabled, a browser key, or pinned to one service. Pick an enabled server key in Add Host and run the command again: it replaces the key on the host.

The host does not appear

Check that the host can reach your Status200 URL over HTTPS, then read the collector's log with the command for its system in Check on a host's collector.

The host says its config failed

Its Collector page shows why the config did not start. The host keeps running the last config that worked, and gets the failed one again when the config changes or you select Try again.

The host shows Not reporting

Status200 has not heard from the host's supervisor for more than 15 minutes. Check that the status200-collector service runs, and that the host can still reach Status200.

Next steps