Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?


Generating Internal Events to Trigger Event Policies


Internal events are events that you create to trigger an event policy. Internal events are not generated by Junos OS processes, and they do not have any associated system log messages. You can configure up to 10 internal events, and you can generate an internal event based on a time interval or the time of day. Event policies can match on internal events in the same way that they match on other events.


If you attempt to commit a configuration with more than 10 internal events, Junos OS generates an error, and the commit fails.

To configure an internal event, include the following statements at the [edit event-options] hierarchy level:

To generate an event at repeated intervals, for example, every hour, configure the time-interval statement, and specify the interval frequency in seconds. The time interval can range from 60 through 2,592,000 seconds. For example, the following command configures an event called event-every-hour that gets generated every hour.

To generate an event at a specific time of day, configure the time-of-day statement, and specify the time at which the event will occur. A time-of-day event is relative to the local device time and is configured using 24-hour time format hh:mm:ss. You can optionally include a UTC offset to specify a time relative to UTC. The syntax is hh:mm:ss(+|-)hhmm, where the sign is plus (+) for east of UTC and minus (-) for west of UTC.

If you omit the UTC offset, Junos OS automatically generates the offset for the time-of-day statement in the configuration based on the local time zone setting for the device. For example, consider a device that uses Eastern standard time (UTC−05:00) for its local time. The following command configures an internal event called event-midnight, which is generated at 12:00 AM (00:00:00) every night.

The resulting configuration automatically includes the device’s offset from UTC.

If you configure the time relative to UTC, and the offset is different from that of the device, Junos OS automatically converts the time to reflect the device’s local time and offset from UTC in the configuration. The following example configures an additional internal event called event-midnight-cst that is generated every night at 12:00 AM (00:00:00) with an offset that is six hours behind UTC.

The resulting configuration displays the event using the device's local time and UTC offset.

If the same device is shipped to a different location, and it is configured to use a new time zone, any configured internal events reflect the new local time and time-zone offset. For example:


If you modify the system time by issuing the set date operational mode command, we recommend that you also issue the commit full or the restart event-process command. Otherwise, an internal event based on the time of day might not be generated at the configured time.

For example, if you configure the device to generate an internal event at 15:55:00, and then you modify the system time from 15:47:17 to 15:53:00, the event is generated when the system time is approximately 16:00 instead of at the configured time, 15:55:00. You can correct this problem by issuing the commit full or the restart event-process command.

Starting in Junos OS Release 14.1, you can include the no-drift option when generating internal events. When you configure no-drift, Junos OS does not propagate the delay caused in triggering an event to the triggering of the next event.