XigmaNAS Status

XigmaNAS reporting page

XigmaNAS Status screenshot 1

Used for XigmaNAS status as a replacement of Status - Monitoring charts. Some metrics are loaded using extra scripts stored under ext/extensions/telegraf/custom_scripts/ folder.

cpu_sysctl script. Used to retrieve CPU temperature and frequency using sysctl.

#!/bin/sh

# Set environment.
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin

CPU0_TEMP="0"
CPU0_FREQ="0"

CPU0_TEMP=$(sysctl -n dev.cpu.0.temperature | tr -d 'C')
if [ -z "${CPU0_TEMP}" ]; then
	# CPU temp unknown.
	CPU0_TEMP="0"
fi
CPU0_FREQ=$(sysctl -n dev.cpu.0.freq)
if [ -z "${CPU0_FREQ}" ]; then
	# CPU freq unknown.
	CPU0_FREQ="0"
fi

printf "cpu_details cpu_temp=${CPU0_TEMP},cpu_freq=${CPU0_FREQ}"

disk_total_read_written script. Update this script with disks that support SMART Total_LBAs_Written and Total_LBAs_Read. It may be helpful for SSD disks to control their usage. How many TBs were written over a time.

#!/bin/sh

# Set environment.
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin

ADA0_READ=$(sudo smartctl -a /dev/ada0 | grep Total_LBAs_Read | awk '{print $NF}')
ADA0_WRITTEN=$(sudo smartctl -a /dev/ada0 | grep Total_LBAs_Written | awk '{print $NF}')
ADA3_WRITTEN=$(sudo smartctl -a /dev/ada3 | grep Total_LBAs_Written | awk '{print $NF}')

printf "hdd_health,name=ada0 total_lba_read=${ADA0_READ},total_lba_written=${ADA0_WRITTEN}\n"
printf "hdd_health,name=ada3 total_lba_written=${ADA3_WRITTEN}\n"

Additionally edit /usr/local/etc/sudoers and add below lines

Cmnd_Alias SMARTCTL = /usr/local/sbin/smartctl
telegraf  ALL=(ALL) NOPASSWD: SMARTCTL
Defaults!SMARTCTL !logfile, !syslog, !pam_session
Revisions
RevisionDescriptionCreated

Get this dashboard

Import the dashboard template

or

Download JSON

Datasource
Dependencies