Compare commits

...

6 Commits

7 changed files with 33 additions and 6 deletions

View File

@ -37,3 +37,5 @@ echo
read md5 _ < <(md5sum "$FILE")
echo "MD5 of the resulting file for the plugin file: $md5"
echo "Run this tool again to validate the MD5 value from the plugin file."
echo
echo "Please remember to fill the changelog in zabbix_agent.plg."

View File

@ -27,4 +27,5 @@ UserParameter=unraid.disk[*],/usr/local/emhttp/plugins/zabbix_agent/scripts/disk
UserParameter=unraid.disks.totals,/usr/local/emhttp/plugins/zabbix_agent/scripts/disks.totals.sh
UserParameter=unraid.qemu.discovery,/usr/local/emhttp/plugins/zabbix_agent/scripts/qemu.discovery.sh
UserParameter=unraid.qemu[*],/usr/local/emhttp/plugins/zabbix_agent/scripts/qemu.sh "$1"
UserParameter=unraid.temperatures,/usr/local/emhttp/plugins/zabbix_agent/scripts/temperatures.sh
UserParameter=unraid.temperatures,/usr/local/emhttp/plugins/zabbix_agent/scripts/temperatures.sh
UserParameter=unraid.ups,/usr/local/emhttp/plugins/zabbix_agent/scripts/ups.sh

View File

@ -0,0 +1,15 @@
#!/bin/bash
echo -n '{"connected":true'
apcaccess | while read key _ value unit _; do
#echo $key - $value - $unit
case "$key" in
"STATUS") echo -n ", \"status\":\"$value\"" ;;
"LOADPCT") echo -n ", \"loadpct\":$value" ;;
"BCHARGE") echo -n ", \"bcharge\":$value" ;;
"TIMELEFT") echo -n ", \"timeleft\":$value" ;;
"BATTV") echo -n ", \"battv\":$value" ;;
"LINEV") echo -n ", \"linev\":$value" ;;
esac
done
echo "}"

Binary file not shown.

Binary file not shown.

View File

@ -4,18 +4,27 @@
<!ENTITY name "zabbix_agent">
<!ENTITY author "fabianonline">
<!ENTITY plgauthor "fabianonline">
<!ENTITY baseURL "https://git.schle.nz/fabian/unraid-zabbix_agent/raw/branch/main">
<!ENTITY baseURL "https://git.schle.nz/fabian/unraid-zabbix_agent/raw/branch/stable">
<!ENTITY pluginURL "&baseURL;/zabbix_agent.plg">
<!ENTITY version "2020.09.05.1">
<!ENTITY version "2020.10.31.1">
<!ENTITY packageName "zabbix_agent-&version;-x86_64-1.txz">
<!ENTITY packageURL "&baseURL;/&packageName;">
<!ENTITY packageMD5 "14e3dd2d08af436deafc8f924b61e958">
<!ENTITY packageMD5 "33d8467dcd13471cc08e0f56e4b611df">
]>
<PLUGIN name="&name;" author="&author;" version="&version;" pluginURL="&pluginURL;" packageMD5="&packageMD5;">
<CHANGES>
##&name;
## &name;
### 2010.10.31.1
- Updated zabbix_agentd from 5.0.2 to 5.0.3
- Download updated plugins from stable instead of main.
- Fixed removal of old plugin packages during updates.
- Added new zabbix endpoint unraid.ups
### 2020.09.05.1
- Added a new field 'running' to qemu.disk
### 2020.08.11
- Added system temperature metrics. Note: These will only work if you have the Dynamix System Temperature plugin installed.
@ -38,7 +47,7 @@ if [ -e /boot/config/plugins/zabbix_agent/&packageName; ]; then
echo "Package already exists."
else
echo "Current &packageName; not found; removing old packages (if existing)."
rm /boot/config/plugins/zabbix_agent/*.package.tgz
rm /boot/config/plugins/zabbix_agent/*.txz
echo "Downloading current package..."
fi
</INLINE></FILE>