I can get data from 1 UPS into LibreNMS
the guide advises multiple UPS can be setup by editing the Variable
*
Optionally if you have multiple UPS or your UPS is not named APCUPS you can specify its name as an argument into /etc/snmp/ups-nut.sh
I’m assuming this is the variable within /etc/snmp/ups-nut.sh
UPS_NAME=“${1:-APCUPS}”
Is there someone who can advise the correct syntax I should use?
Is it UPS_NAME=“${1:-Eaton1,2:-Eaton2,3:-Eaton3}” ?
I’ve never used this script, but in general, in sh/bash scripts, something like ${1:-APCUPS} would mean read argument 1 from the CLI command and if it isn’t specified the default value is APCUPS. So you shouldn’t need to change this.
That full text of that doc page says…
Optionally if you have multiple UPS or your UPS is not named APCUPS you can specify its name as an argument into /etc/snmp/ups-nut.sh
I was getting this error, changing the lines as follow resolved the duplicate issue
extend ups-nut …
to
extend ups-nut-eaton1 /etc/snmp/ups-nut.sh Eaton1
extend ups-nut-eaton2 /etc/snmp/ups-nut.sh Eaton2
extend ups-nut-eaton3 /etc/snmp/ups-nut.sh Eaton3
I’m working on the script currently to have work with multiple devices