Metricbeat

sfcredfox

Patron
Joined
Aug 26, 2014
Messages
340
Basically asking for any updates to a previous closed post: https://www.truenas.com/community/threads/monitoring-with-metricbeat.69098/

Has anyone been able to utilize metric beat for monitoring performance?

We are more invested in Elasticsearch than graphite or grafana, so I was hoping this was possible.

Also, if you really want deep metrics for performance, you have to use iostat or zilstat. Since they normally output to console, you'd need to redirect their output to a file, but in theory, could you then ship that file to logstash for graphing in Kibana (for those familiar with Elasticstack)?
 
Last edited:

sfcredfox

Patron
Joined
Aug 26, 2014
Messages
340
How about grafana, has anyone ever graphed zilstat output?
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
I have not yet cared about the zilstat output but if you use the chain data source --> influxdb --> Grafana that is quite simple by using the Graphite plaintext protocol to feed into influxdb.

This is what I wrote to monitor my zpool usage:
Code:
#! /bin/sh

HOST="192.168.1.55"
PORT="2003"
PREFIX="servers"

time=$(/bin/date +%s)
hostname=$(/bin/hostname | /usr/bin/tr '.' '_')

/usr/local/sbin/zpool list -Hp | while read pool size alloc free ignore
do
    ralloc=$(echo "scale=8;${alloc}/${size}" | /usr/bin/bc)  
    rfree=$(echo "scale=8;${free}/${size}" | /usr/bin/bc)  

    echo "${PREFIX}.${hostname}.zpool.${pool}.size ${size} ${time}"
    echo "${PREFIX}.${hostname}.zpool.${pool}.alloc ${alloc} ${time}"
    echo "${PREFIX}.${hostname}.zpool.${pool}.alloc-ratio ${ralloc} ${time}"
    echo "${PREFIX}.${hostname}.zpool.${pool}.free ${free} ${time}"
    echo "${PREFIX}.${hostname}.zpool.${pool}.free-ratio ${rfree} ${time}"
done | /usr/bin/nc "${HOST}" "${PORT}" -w2


Maybe that helps a bit.
 

sfcredfox

Patron
Joined
Aug 26, 2014
Messages
340
@Patrick M. Hausen
I'll try to start getting my head around this. Thanks for the reply.
 
Top