Skip to content

Commit 315b5db

Browse files
Patrice GautierPatrice Gautier
Patrice Gautier
authored and
Patrice Gautier
committed
Merge branch 'master' of github.com:patricegautier/unifiZabbix
2 parents a4c6178 + 708512a commit 315b5db

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

README.md

+7-4
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,20 @@ On Raspbian, this can be done with:
2020

2121
apt-get install jq
2222

23-
## Install mca-dump-short script as a Zabbix external script
23+
## Install mca-dump-short and ssh-run scripts as a Zabbix external script
2424

25-
You need to install mca-dump-short.sh in Zabbix's external script directory
25+
You need to install mca-dump-short.sh and ssh-run in Zabbix's external script directory
2626

2727
Please confirm where that directory is from the variable ExternalScripts in your zabbix server conf at /etc/zabbix/zabbix_server.conf. On my system this is set to:
2828

2929
ExternalScripts=/usr/lib/zabbix/externalscripts
3030

31-
After cp-ing the script to that directory, make sure you have the permissions necessary for zabbix to execute this script:
31+
After cp-ing the scripta to that directory, make sure you have the permissions necessary for zabbix to execute this script:
3232

3333
chown zabbix:zabbix /usr/lib/zabbix/externalscripts /usr/lib/zabbix/externalscripts/mca-dump-short.sh
3434
chmod a+x /usr/lib/zabbix/externalscripts /usr/lib/zabbix/externalscripts/mca-dump-short.sh
3535

36+
and the same for ssh-run
3637

3738
## Import the Unifi templates into Zabbix
3839

@@ -143,6 +144,9 @@ The file name for your private key in SSHKeyLocation. For me this is set to zb_
143144
### {$UNIFI_PUB_KEY}
144145
The file name for your public key in SSHKeyLocation. For me this is set to zb_id_rsa.pub
145146

147+
### {$UNIFI_SSHPASS_PASSWORD_PATH}
148+
If you are having trouble geting ssh going with public/private key pair authentication, you can optionally supply the path of a file that contains the SSH password to your Unifi devices. If supplied, the template will use sshpass to provide the password to ssh. There are more security implications to doing this than using the keypair method..
149+
146150
### {$UNIFI_CHECK_FREQUENCY}
147151
I have this set to '1m'
148152

@@ -176,7 +180,6 @@ The load average value above which to issue a info. The consensus is 1 for this
176180
The load average value above which to issue a warning. I have this set to 2. Note that for switches and APs this value has less meaning since they process packets with specialized HW and this macro is overridden in the template to avoid too many warnings
177181

178182

179-
180183
# SUCCESS!
181184

182185
If you got this far, congratulations the install is complete! Now for the funner part:

mca-dump-short.sh

+1
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ elif [[ ${DEVICE_TYPE} == 'SWITCH_FEATURE_DISCOVERY' ]]; then
5454
total_power_consumed_key_name: \"total_power_consumed\",\
5555
max_power_key_name: \"max_power\",\
5656
max_power: .total_max_power,\
57+
percent_power_consumed_key_name: \"percent_power_consumed\",\
5758
has_eth1: .has_eth1,\
5859
has_temperature: .has_temperature,\
5960
temperature_key_name: \"temperature\",\

0 commit comments

Comments
 (0)