System Metrics

System Metrics

Ship your System Metrics to your Logit.io stack

Follow the steps below to send your observability data to Logit.io

Metrics

Configure Telegraf to ship system metrics to your Logit.io stacks via Logstash.

Install Integration

Please click on the Install Integration button to configure your stack for this source.

Install Telegraf

This integration allows you to configure a Telegraf agent to send your metrics, in multiple formats, to Logit.io.

Choose the installation method for your operating system:

When you paste the command below into Powershell it will download the Telegraf zip file. Once that is complete, press Enter again and the zip file will be extracted into C:\Program Files\InfluxData\telegraf\telegraf-1.31.2.

wget https://dl.influxdata.com/telegraf/releases/telegraf-1.31.2_windows_amd64.zip -UseBasicParsing -OutFile telegraf-1.31.2_windows_amd64.zip 
Expand-Archive .\telegraf-1.31.2_windows_amd64.zip -DestinationPath 'C:\Program Files\InfluxData\telegraf'

Configure the plugin

The default telegraf.conf configuration file is thousands of lines long so, for simplicity, we will create a new configuration file for this guide. Create a new text file and copy the configuration details below into it and save it as telegraf-demo.conf in the directory where Telegraf has been installed.

The configuration below will scrape a selection of system metrics from the machine you have installed Telegraf on and these will be sent to your Logit.io stack. Metrics include CPU, memory and disk usage and system metrics such as system load and uptime.

# Read metrics about cpu usage
[[inputs.cpu]]
    ## Whether to report per-cpu stats or not
    percpu = true
    ## Whether to report total system cpu stats or not
    totalcpu = true
    ## If true collect raw cpu time metrics
    collect_cpu_time = true
    ## If true compute and report the sum of all non-idle cpu states
    report_active = true
 
# Read metrics about memory usage
[[inputs.mem]]
 
# Read metrics about system load & uptime
[[inputs.system]]
    namepass = ["system"]
 
# Read metrics about disk usage by mount point
[[inputs.disk]]
    ## By default, telegraf gather stats for all mountpoints.
    ## Setting mountpoints will restrict the stats to the specified mountpoints.
    # mount_points = ["/"]
 
    ## Ignore some mountpoints by filesystem type. For example (dev)tmpfs (usually
    ## present on /run, /var/run, /dev/shm or /dev).
    ignore_fs = ["tmpfs", "devtmpfs"]
 
[[outputs.http]]
  url = "https://@metricsUsername:@metricsPassword@@metrics_id-vm.logit.io:@vmAgentPort/api/v1/write"
  data_format = "prometheusremotewrite"
 
[outputs.http.headers]
Content-Type = "application/x-protobuf"
Content-Encoding = "snappy"

Start Telegraf

From the location where Telegraf was installed (C:\Program Files\InfluxData\telegraf\telegraf-1.31.2) run the program providing the chosen configuration file as a parameter:

.\telegraf.exe --config telegraf-demo.conf

Once Telegraf is running you should see output similar to the following, which confirms the inputs, output and basic configuration the application has been started with: Powershell Telegraf information

Launch Metrics to View Data

Click the 'Launch Metrics' button below to open the infrastructure metrics visualizer.

Launch Metrics

Once opened, click on the Explore option in the left-hand menu: Grafana Explore

Under the Metric header you will see 'Select metric'. Open the drop-down menu and scroll to and select 'mem_used': Grafana Select Metric

Click on the blue Run query button near the top-right of the screen: Grafana Run Query

You will now see the 'mem_used' metric data displayed and if you click on the blue Run query button this will be updated. You can set this to automatically update by clicking on the arrow on the blue button and chosing the interval you want the data to be updated.

When you want to stop Telegraf sending metric data press Ctrl + C in the terminal app / Powershell.

If you need any further assistance with shipping your metric data to Logit.io we're here to help you get started. Feel free to get in contact with our support team by sending us a message via live chat & we'll be happy to assist.