1
0
mirror of https://github.com/librenms/librenms-agent.git synced 2024-05-09 09:54:52 +00:00

11 Commits

Author SHA1 Message Date
c09263d04e Fixing agent-local hddtemp script (#436) 2022-11-13 11:06:10 +01:00
61064dc9fe Cleanup some code (#355)
* Format with isort

* Format with Black

* Fix CRLF

* Format with shellcheck

* Fix some warning

* Fix PHP style

* Dont modifiy check_mk files

* Fixes
2021-03-18 12:24:30 +01:00
3b9d632a8d hddtemp, ignore devices not supporting SMART (#153) 2017-12-04 20:11:17 +00:00
cc6d7882db Strip all non-ASCII characters from hddtemp output (#136) 2017-06-10 10:20:48 +01:00
d7085e001c hddtemp: parallelize calls to hddtemp for performance (#117)
This poll script runs hddtemp with a list of all drives as arguments and reads the output. hddtemp scans each drive's SMART status serially, which scales poorly with a large number of drives.

In lieu of a patch to the actual hddtemp project, optionally use GNU parallel when available to parallelize the call to hddtemp.

In testing a machine with 58 drives I went from a runtime of about 5 seconds per run to 0.5s, a performance improvement of 10x.
2017-04-18 21:32:41 +01:00
5f47aad492 hddtemp: improve detection of drives (#115)
Previously, this script was only able to find 26 drives (sda-sdz) due to the use of globbing.

A better strategy for detecting drives would be to use lsblk on systems that support it, failing over to globbing.

This patch adds support both for lsblk and a more comprehensive glob solution with find that will at least catch 26^2 drives.
2017-04-07 07:45:56 +01:00
ff6ee0e2bc Fixed correct amount of pipeline symbols when degrees symbol is missing. (#85)
When the script is called through xinetd/check_mk (on my system), there is no degree symbol, but a space.
Changed the script to handle both correctly
2017-02-17 00:46:13 +00:00
6128dc3c71 Update hddtemp to include hddtemp -w option (#56)
hddtemp gives inconsistent values in it's current state, after some debugging I was able to resolve the issue by passing -w to the hddtemp command, this will wake-up the drive if it is in a sleep state to gather information.
2016-09-09 07:16:28 +01:00
760f9de567 /bin/bash => /usr/bin/env bash to allow freebsd agent work without patching each files 2016-07-29 13:23:20 +02:00
8d856e2764 Improved hddtemp agent module
I had some issues with the netcat / daemon implementation of the module.
netcat was stallingor sometimes netcat did not return the full output of hddtemp.
Running hddtemp directly without running it as a daemon is much more stable for me.

This new version also does not give any stdout output when hddtemp is not installed or when no disks can be found.
Running the script manually on a server does give stderr output for easy debugging.
2016-05-05 10:27:30 +02:00
f0o
195a46c1e3 Initial commit 2015-05-18 10:58:01 +00:00