Dying Gasp enabler (DGe)
This chapter covers some aspects related to the service external-dying-gasp
,
which allows you to configure a Dying Gasp enabler (DGe) in OSDx.

A DGe is an energy-storing device meant to be used as backup for Teldat network devices for a short period of time (order of seconds) when a power failure occurs.
If the DGe is attached to a network device and the dying-gasp service is active, when a power failure occurs, the DGe sends a signal to the device through the local console port and the device reacts to that signal initiating a system close. It then self-reboots safely and waits for the power supply to fully discharge.
Caution
If the cable that is plugged into the console port has a DGe label on one end, this end must be plugged into the Dying Gasp enabler, otherwise the signal sent by the DGe will not be detected by the router.
Configuration
To connect and use a Dying Gasp enabler, you must first set the OSDx device’s console port to
dying-gasp mode. You can do this using the service external-dying-gasp
command
from a Telnet or SSH session:
set service external-dying-gasp
Once committed, this will allow the OSDx device to monitor the console port while the service is set.
Caution
You will not be able to manage your OSDx device by connecting to the console port while
this mode is enabled. Therefore, an alternative method must be established to access
the device’s Command Line Interface (CLI), such as SSH or Telnet, and use
service external-dying-gasp
on that session.
See SSH or
Telnet to learn more about
these services.
To restore the console port’s normal operation and use it to regain access to the device’s CLI,
execute the delete operation on the same service external-dying-gasp
command.
This will revert the settings and allow CLI access via the console port again:
delete service external-dying-gasp
Time delay
This command modifies the time, in seconds, it takes for the device to close and reboot once the DGe signal is detected. By default, no delay is configured.
Tip
The delay can be set in fractions of seconds, i.e. in the order of milliseconds.
This is the syntax to set the value of the service external-dying-gasp delay <float>
configuration in OSDx:
set service external-dying-gasp delay <value>
For example, this command will set a delay of one second:
set service external-dying-gasp delay 1.0
Log level
This command selects the logging level of the external-dying-gasp daemon through the journal. By default, it is set to notice level.
This is the syntax to change the logging level for the
service external-dying-gasp log-level <txt>
configuration in OSDx:
set service external-dying-gasp log-level <level>
Being <level> one of the following options:
emerg, emergency messages
alert, urgent messages
crit, critical messages
err, error messages
warning, warning messages
notice, messages for further investigation
info, informational messages
debug, debug messages
For example, this command will change the logging level to error:
set service external-dying-gasp log-level err
SNMP management
Important
To better understand how to configure the Simple Network Management Protocol (SNMP) service, see SNMP documentation.
For the OSDx device to be able to send traps, you will first need to create an SNMP community or user and establish the external-dying-gasp service as target.
After the SNMP service is configured, the sending of traps must be enabled for the DGe by executing the following command in OSDx:
set service external-dying-gasp enable-snmp-trap
Examples
To enable the external-dying-gasp service with default settings:
set service external-dying-gasp
In this case, the expected behaviour is that, when a power failure occurs, the external-dying-gasp service prints notice level logs indicating that the DGe signal has been detected. The device then reboots as soon as possible.
To enable the external-dying-gasp service with the following settings:
Logging level set to warning messages.
SNMP traps enabled (SNMP service previously configured).
Delay of two and a half seconds.
set service external-dying-gasp log-level warning
set service external-dying-gasp enable-snmp-trap
set service external-dying-gasp delay 2.5
In this case, the expected behaviour is that, when a power failure occurs, the external-dying-gasp service prints warning level logs indicating that the DGe signal has been detected. The device then sends an SNMP trap and, after 2.5 seconds, it reboots.