Compare commits

...

6 Commits

7 changed files with 33 additions and 6 deletions

View File

@ -37,3 +37,5 @@ echo
read md5 _ < <(md5sum "$FILE") read md5 _ < <(md5sum "$FILE")
echo "MD5 of the resulting file for the plugin file: $md5" 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 "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

@ -28,3 +28,4 @@ UserParameter=unraid.disks.totals,/usr/local/emhttp/plugins/zabbix_agent/scripts
UserParameter=unraid.qemu.discovery,/usr/local/emhttp/plugins/zabbix_agent/scripts/qemu.discovery.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.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,12 +4,12 @@
<!ENTITY name "zabbix_agent"> <!ENTITY name "zabbix_agent">
<!ENTITY author "fabianonline"> <!ENTITY author "fabianonline">
<!ENTITY plgauthor "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 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 packageName "zabbix_agent-&version;-x86_64-1.txz">
<!ENTITY packageURL "&baseURL;/&packageName;"> <!ENTITY packageURL "&baseURL;/&packageName;">
<!ENTITY packageMD5 "14e3dd2d08af436deafc8f924b61e958"> <!ENTITY packageMD5 "33d8467dcd13471cc08e0f56e4b611df">
]> ]>
<PLUGIN name="&name;" author="&author;" version="&version;" pluginURL="&pluginURL;" packageMD5="&packageMD5;"> <PLUGIN name="&name;" author="&author;" version="&version;" pluginURL="&pluginURL;" packageMD5="&packageMD5;">
@ -17,6 +17,15 @@
<CHANGES> <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 ### 2020.08.11
- Added system temperature metrics. Note: These will only work if you have the Dynamix System Temperature plugin installed. - Added system temperature metrics. Note: These will only work if you have the Dynamix System Temperature plugin installed.
- Fixed the virtual interface detection in unraid.qemu. - Fixed the virtual interface detection in unraid.qemu.
@ -38,7 +47,7 @@ if [ -e /boot/config/plugins/zabbix_agent/&packageName; ]; then
echo "Package already exists." echo "Package already exists."
else else
echo "Current &packageName; not found; removing old packages (if existing)." 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..." echo "Downloading current package..."
fi fi
</INLINE></FILE> </INLINE></FILE>