Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md with instructions to connect node to netdata #6

Merged
merged 1 commit into from
Mar 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 8 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,31 +13,21 @@ Output example:

{"module_id": "netdata1", "image_name": "netdata", "image_url": "ghcr.io/nethserver/netdata:latest"}

## Configure
## Connect Node to netdata
When you want to display you node in netdata room the application could ask you to prove that you are well the sysadmin of the agent. A file `netdata_random_session_id` contains some random strings that the netdata application could ask you. To retrieve it

Let's assume that the mattermost instance is named `netdata1`.
`cat /var/lib/nethserver/netdata1/state/netdata/lib/netdata_random_session_id`

Launch `configure-module`, by setting the following parameters:
- `host`: a fully qualified domain name for the application
- `http2https`: enable or disable HTTP to HTTPS redirection (true/false)
- `lets_encrypt`: enable or disable Let's Encrypt certificate (true/false)
Once you have pasted it you can see the node in the room


Example:
You coud also register to a romm by setting two environment variables inside the file environment `/var/lib/nethserver/netdata1/state/environment`

```
api-cli run configure-module --agent module/netdata1 --data - <<EOF
{
"host": "netdata.domain.com",
"http2https": true,
"lets_encrypt": false
}
EOF
NETDATA_CLAIM_ROOMS=
NETDATA_CLAIM_TOKEN=
```

The above command will:
- start and configure the netdata instance
- configure a virtual host for trafik to access the instance
Once done you can restart the service by `systemctl restart netdata1`

## Get the configuration
You can retrieve the configuration with
Expand Down
Loading