Please read Script Templates section in Lighthouse manual https://ftp.opengear.com/download/documentation/manual/current/lighthouse/ and the following article as it explains Script Templates usage, how to upload and apply to specific nodes.
https://opengear.zendesk.com/hc/en-us/articles/115004747366-Configuration-Templating-on-Lighthouse-5
Note: Use the freely available Notepad++ which allows you to save the script with Unix (LF) line endings, not DOS (CRLF) line endings. Ensure any 'single' and "double" quotation marks have not been converted into curly “smart quotes”. Applying scripts with DOS (CRLF) line endings will break node configuration.
To delete all Auto-Response:
Paste the commands below into the CLI.
config -d config.autoresponse -a
Setup Auto-Response:
Here's an example Auto-Response to send SNMP Trap when temperature exceeds 32 degC.
SSH into the Node and run the following command to generate the configuration.
echo "config \\" ; echo "-d config.autoresponse \\" ; config -g config.autoresponse | sed -e 's/ /=\'\''/' -e 's/$/'\'' \\/' -e 's/^/-s /'; echo "-a"
Here is the output. The lines starting with "-d" deletes all auto-response before applying this configuration.
config \
-d config.autoresponse \
-s config.autoresponse.autoresponse1.check_type='environmental' \
-s config.autoresponse.autoresponse1.enviro.check_type='temp' \
-s config.autoresponse.autoresponse1.enviro.comparison='greater' \
-s config.autoresponse.autoresponse1.enviro.dev_ref='config.internals.internal1.enviro' \
-s config.autoresponse.autoresponse1.enviro.hysteresis='0' \
-s config.autoresponse.autoresponse1.enviro.trigger_val='32' \
-s config.autoresponse.autoresponse1.name='Room Temp' \
-s config.autoresponse.autoresponse1.repeat_timeout='300' \
-s config.autoresponse.autoresponse1.reset_timeout='0' \
-s config.autoresponse.autoresponse1.resolve_actions.total='0' \
-s config.autoresponse.autoresponse1.trigger_actions.action1.action_type='snmp' \
-s config.autoresponse.autoresponse1.trigger_actions.action1.delay_time='0' \
-s config.autoresponse.autoresponse1.trigger_actions.action1.name='Room Temp High' \
-s config.autoresponse.autoresponse1.trigger_actions.total='1' \
-s config.autoresponse.total='1' \
-a
The commands can be copied and pasted directly on the Console Server CLI or saved in a file (attached) and deployed via Lighthouse Script Template.
Comments
0 comments
Article is closed for comments.