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


  1. Install InfluxDB from yum repository.
    1. 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.key
      BASH
    2. Install with the command:
      sudo yum install -y influxdb
      BASH
  2. Use a custom configuration file
    1. Locate /etc/influxdb/influxdb.conf. Make a note of the file ownership and permissions.
    2. 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.
  3. 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 --reload
    TEXT
  4. Enable and start the service
    1. Enable the InfluxDB service for startup with the command:
      sudo systemctl enable influxdb
      BASH
    2. Start InfluxDB with the command:
      sudo systemctl start influxdb
      BASH

  5. 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


  1. 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.rpm
    BASH
  2. 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 --reload
    TEXT
  3. Enable and start the service:
    1. Enable the Grafana service for startup with the command:

      sudo systemctl enable grafana-server
      BASH
    2. Start Grafana with the command:

      sudo systemctl start grafana-server
      BASH
  4. Proceed to installing the Telemetry node.