Monitoring node
Downloads
Download the twc-scripts-<version>-linux-monitoring-stack.zip here.
Install the following components, which constitute the monitoring node:
- InfluxDB - a time-series database for collecting metric data
- Grafana - dashboard visualization layer
Installing and configuring InfluxDB
To install and configure InfluxDB
- Install InfluxDB from yum repository.
- Create /etc/yum.repos.d/influxdb.repo with the following:
[influxdata] name = InfluxData Repository - Stable baseurl = https://repos.influxdata.com/stable/$basearch/main enabled = 1 gpgcheck = 1 gpgkey = https://repos.influxdata.com/influxdata-archive.keyBASH - Install with the command:
sudo yum install -y influxdbBASH
- Create /etc/yum.repos.d/influxdb.repo with the following:
- Use a custom configuration file
- Locate /etc/influxdb/influxdb.conf. Make a note of the file ownership and permissions.
- Locate influxdb.conf from the extracted Monitoring-Node-Install folder and replace the existing /etc/influxdb/influxdb.conf with the new file. Be sure to reset ownership and permissions after replacement.
- Open ports for InfluxDB, if needed. Refer to the port table.
cat <<EOF > /etc/firewalld/services/influxdb.xml <?xml version="1.0" encoding="utf-8"?> <service version="1.0"> <short>influxdb</short> <description>InfluxDB</description> <port port="8086" protocol="tcp"/> </service> EOF sleep 10 FWZONE=$(firewall-cmd --get-default-zone) firewall-cmd --permanent --zone=$FWZONE --add-service=influxdb firewall-cmd --reloadTEXT - Enable and start the service
- Enable the InfluxDB service for startup with the command:
sudo systemctl enable influxdbBASH - Start InfluxDB with the command:
sudo systemctl start influxdbBASH
- Enable the InfluxDB service for startup with the command:
- Create InfluxDB databases with a 35-day retention policy using the following commands:
sudo influx -execute "CREATE DATABASE telegraf with duration 35d"BASH
Installing Grafana
To install Grafana on the monitoring node
Determine a Grafana version and use the following command to install (example for version 9.2.10):
GRAFANA_VER=9.2.10 sudo yum install -y https://dl.grafana.com/oss/release/grafana-$GRAFANA_VER-1.x86_64.rpmBASH- Open port for Grafana, if needed. Refer to port table.
cat <<EOF > /etc/firewalld/services/grafana.xml <?xml version="1.0" encoding="utf-8"?> <service version="1.0"> <short>grafana</short> <description>Grafana</description> <port port="3000" protocol="tcp"/> </service> EOF FWZONE=$(firewall-cmd --get-default-zone) firewall-cmd --permanent --zone=$FWZONE --add-service=grafana firewall-cmd --reloadTEXT - Enable and start the service:
Enable the Grafana service for startup with the command:
sudo systemctl enable grafana-serverBASHStart Grafana with the command:
sudo systemctl start grafana-serverBASH
- Proceed to installing the Telemetry node.