mackerel-plugin-hddtemp

command module
v0.0.0-...-5c9dcff Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 13, 2021 License: MIT, MIT Imports: 7 Imported by: 0

README

mackerel-plugin-hddtemp

A mackerel plugin to post temperature of disks as host metrics.

Prerequisties

mackerel-plugin-hddtemp requires one of the following command executable in PATH.

  • smartctl
  • hddtemp

Usage

Installation

execute mkr install xruins/mackerel-plugin-hddtemp.

Wigh go get command

execute go get github.com/xruins/mackerel-plugin-hddtemp, then mackerel-plugin-hddtemp is placed on $GOPATH/bin.

Command reference

Typically, execute command with devices to measure the temperature.

mackerel-plugin-hddtemp /dev/sda /dev/sdb

This command will output result as follows.

$ mackerel-plugin-hddtemp /dev/sda /dev/sdb
hddtemp.sdb.temperature 30      1615617068
hddtemp.sda.temperature 31      1615617068
Usage of ./mackerel-plugin-hddtemp:
  -method string
    	method to fetch HDD temperature. choose one: "auto","smartctl","hddtemp" (default "auto")
  -metric-key-prefix string
    	Metric key prefix
  -tempfile string
    	Temp file name
method

The option to specify the method to measure the temperature of disks. It is set to auto by default.

auto: use either smartctl or hddtemp. if both command is available, use smartctl. smartctl : use smartctl command. hddtemp : use hddtemp command.

metric-key-prefix

The option to modify prefix of metrics for mackerel. it is set to blank by default.

By default settings, metrics are as follows.

$ mackerel-plugin-hddtemp /dev/sda /dev/sdb
hddtemp.sdb.temperature 30      1615617068
hddtemp.sda.temperature 31      1615617068

By specifying "foo", metrics are as follows.

$ mackerel-plugin-hddtemp -metric-key-prefix=foo /dev/sda /dev/sdb
foo.sda.temperature     31      1615617091
foo.sdb.temperature     30      1615617091
tempfile

The option to specify where place tempfile.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
lib

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL