Compare commits
No commits in common. "04fc38f69a8942129e40b22d06dc72a11275576a" and "d5329a3919f18811f2f56e32d0339ba51729e234" have entirely different histories.
04fc38f69a
...
d5329a3919
@ -9,7 +9,7 @@ while read line; do
|
|||||||
if [ $found = 1 ]; then
|
if [ $found = 1 ]; then
|
||||||
[ $fsFree -ge 0 ] && [ $fsSize -ge 0 ] && fsUsed=$(( $fsSize - $fsFree ))
|
[ $fsFree -ge 0 ] && [ $fsSize -ge 0 ] && fsUsed=$(( $fsSize - $fsFree ))
|
||||||
echo -n '{"device":"'$device'", "name":"'$name'", "status":"'$status'", "temp":'$temp', "size":'$size', "num_reads":'$num_reads', '
|
echo -n '{"device":"'$device'", "name":"'$name'", "status":"'$status'", "temp":'$temp', "size":'$size', "num_reads":'$num_reads', '
|
||||||
echo -n '"num_writes":'$num_writes', "num_errors":'$num_errors', "type":"'$type'", "fs_size":'$fsSize', "fs_free":'$fsFree', "fs_used":'$fsUsed', "running":'$running', '
|
echo -n '"num_writes":'$num_writes', "num_errors":'$num_errors', "type":"'$type'", "fs_size":'$fsSize', "fs_free":'$fsFree', "fs_used":'$fsUsed', '
|
||||||
break
|
break
|
||||||
else
|
else
|
||||||
device=''
|
device=''
|
||||||
@ -24,7 +24,6 @@ while read line; do
|
|||||||
fsSize=-1
|
fsSize=-1
|
||||||
fsFree=-1
|
fsFree=-1
|
||||||
fsUsed=-1
|
fsUsed=-1
|
||||||
running=-1
|
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
while IFS="=" read key value; do
|
while IFS="=" read key value; do
|
||||||
@ -42,12 +41,6 @@ while read line; do
|
|||||||
[ $key = "type" ] && type="$value"
|
[ $key = "type" ] && type="$value"
|
||||||
[ $key = "fsSize" ] && fsSize=$(( $value * 1024 ))
|
[ $key = "fsSize" ] && fsSize=$(( $value * 1024 ))
|
||||||
[ $key = "fsFree" ] && fsFree=$(( $value * 1024 ))
|
[ $key = "fsFree" ] && fsFree=$(( $value * 1024 ))
|
||||||
if [ $key = "color" ]; then
|
|
||||||
case "$value" in
|
|
||||||
green-on) running=1;;
|
|
||||||
green-blink) running=0;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
done <<< "$line"
|
done <<< "$line"
|
||||||
fi
|
fi
|
||||||
done < <(cat /var/local/emhttp/disks.ini ; echo "[empty]")
|
done < <(cat /var/local/emhttp/disks.ini ; echo "[empty]")
|
||||||
|
Binary file not shown.
@ -6,10 +6,10 @@
|
|||||||
<!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/main">
|
||||||
<!ENTITY pluginURL "&baseURL;/zabbix_agent.plg">
|
<!ENTITY pluginURL "&baseURL;/zabbix_agent.plg">
|
||||||
<!ENTITY version "2020.09.05.1">
|
<!ENTITY version "2020.08.22.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 "1aae2b12fb6827c934d1e70c9c7ab15a">
|
||||||
]>
|
]>
|
||||||
|
|
||||||
<PLUGIN name="&name;" author="&author;" version="&version;" pluginURL="&pluginURL;" packageMD5="&packageMD5;">
|
<PLUGIN name="&name;" author="&author;" version="&version;" pluginURL="&pluginURL;" packageMD5="&packageMD5;">
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<zabbix_export>
|
<zabbix_export>
|
||||||
<version>5.0</version>
|
<version>5.0</version>
|
||||||
<date>2020-09-05T12:40:25Z</date>
|
<date>2020-08-28T19:01:50Z</date>
|
||||||
<groups>
|
<groups>
|
||||||
<group>
|
<group>
|
||||||
<name>Templates</name>
|
<name>Templates</name>
|
||||||
@ -592,29 +592,6 @@
|
|||||||
<key>unraid.disk[{#ID}]</key>
|
<key>unraid.disk[{#ID}]</key>
|
||||||
</master_item>
|
</master_item>
|
||||||
</item_prototype>
|
</item_prototype>
|
||||||
<item_prototype>
|
|
||||||
<name>Disk {#ID} running</name>
|
|
||||||
<type>DEPENDENT</type>
|
|
||||||
<key>unraid.disk[{#ID},running]</key>
|
|
||||||
<delay>0</delay>
|
|
||||||
<applications>
|
|
||||||
<application>
|
|
||||||
<name>Disks</name>
|
|
||||||
</application>
|
|
||||||
</applications>
|
|
||||||
<valuemap>
|
|
||||||
<name>Yes/No</name>
|
|
||||||
</valuemap>
|
|
||||||
<preprocessing>
|
|
||||||
<step>
|
|
||||||
<type>JSONPATH</type>
|
|
||||||
<params>$.running</params>
|
|
||||||
</step>
|
|
||||||
</preprocessing>
|
|
||||||
<master_item>
|
|
||||||
<key>unraid.disk[{#ID}]</key>
|
|
||||||
</master_item>
|
|
||||||
</item_prototype>
|
|
||||||
<item_prototype>
|
<item_prototype>
|
||||||
<name>Disk {#ID} size</name>
|
<name>Disk {#ID} size</name>
|
||||||
<type>DEPENDENT</type>
|
<type>DEPENDENT</type>
|
||||||
@ -926,19 +903,4 @@ return j.cpu_time / j.cpus * 100;</params>
|
|||||||
</discovery_rules>
|
</discovery_rules>
|
||||||
</template>
|
</template>
|
||||||
</templates>
|
</templates>
|
||||||
<value_maps>
|
|
||||||
<value_map>
|
|
||||||
<name>Yes/No</name>
|
|
||||||
<mappings>
|
|
||||||
<mapping>
|
|
||||||
<value>0</value>
|
|
||||||
<newvalue>No</newvalue>
|
|
||||||
</mapping>
|
|
||||||
<mapping>
|
|
||||||
<value>1</value>
|
|
||||||
<newvalue>Yes</newvalue>
|
|
||||||
</mapping>
|
|
||||||
</mappings>
|
|
||||||
</value_map>
|
|
||||||
</value_maps>
|
|
||||||
</zabbix_export>
|
</zabbix_export>
|
||||||
|
Loading…
Reference in New Issue
Block a user