Line 287: |
Line 287: |
| There are template fragments in /etc/e-smith/templates/etc/ups that control the config files located in /etc/ups. The default settings should be OK for most situations. | | There are template fragments in /etc/e-smith/templates/etc/ups that control the config files located in /etc/ups. The default settings should be OK for most situations. |
| | | |
− | An example of doing this can be found in the forum: http://forums.contribs.org/index.php?topic=40668.0
| + | By default, nut is configured for a USB connected UPS in Master mode, but is disabled. When enabled, nut will monitor the UPS and take various actions when certain notifications are received. This is controlled by the '''/etc/ups/upsmon.conf''' file which among other things lists the notifications and the actions to be taken for each. For example an 'on battery' event is captured by the '''NOTIFYFLAG ONBATT''' entry and the following '''SYSLOG+WALL+EXEC''' command string. This string tells upsmon to write the event to the System Log, broadcast a message to all users via Wall, and execute the command denoted by the NOTIFYCMD entry. |
| + | |
| + | SME Server sets the NOTIFYCMD to '''/sbin/e-smith/nutUPS.notify''', and this executable file simply sends an email to the SME admin user with a notification of the event. |
| + | |
| + | Apart from the various events that the UPS and '''upsmon''' may notify via the NOTIFYFLAGS, a '''Low Battery''' event will automatically and immediately cause '''upsmon''' to issue the '''SHUTDOWNCMD''' as defined in '''upsmon.conf''' (signal-event halt) and set a flag '''POWERDOWNFLAG''' so it knows on future restart that it is a UPS recovery. |
| | | |
| For information on configuration parameters: | | For information on configuration parameters: |
Line 302: |
Line 306: |
| The NUT website is here | | The NUT website is here |
| | | |
− | http://www.networkupstools.org/ | + | [http://www.networkupstools.org/ NUT] |
| + | |
| + | From the above references you can glean which configuration setting does what function, etc. |
| | | |
− | From that website you can glean which configuration setting does what function
| + | If you want to modify the operation of nut from the standard configuration, then you should generally modify the NUT config files by creating custom templates, expanding the templates and restarting service. This will ensure modifications survive a future reboot or reconfiguration. |
| | | |
− | Then modify the NUT config file, by creating a custom template, expanding template and restarting service
| + | An example of doing this can be found in the forum [http://forums.contribs.org/index.php?topic=40668.0] and in the section above for UPS Administrative Privileges |
| | | |
| ---- | | ---- |
| <noinclude>[[Category:Howto]]</noinclude> | | <noinclude>[[Category:Howto]]</noinclude> |