Event Adjustment¶
The Event Adjustment feature allows Service Owners and Service Level Managers to retroactively add events. Indeed, an Event Adjustment is the action of adding to a monitored host or service an event over a given period of time, that actually did not take place. This proves useful in situations where, for instance, the Operational team has forgotten to schedule Downtime in advance: this oversight would add to a wrong calculation of the availability, therefore adding an Event Adjustment that covers the unscheduled downtime would fix the problem. It is worth noting that Event Adjustments will affect the availability calculations for hosts and services, and potentially affect whether the service provider is or is not satisfying the target SLA specified in the customer contract.
How It Works¶
The Event Adjustment feature is an extension of the SLM module, and can only be performed by a NetEye user with a certain privilege level. All inserted event adjustments are stored in a dedicated database table in order to ensure that the data (i.e., the existing timeline) cannot be manipulated. Event adjustments are taken into account during Availability calculations without any additional intervention.
Each adjustment must be applied to a monitored object. The following table indicates which types of event adjustments can be applied to each type of monitored object.
Monitored Object Type |
Event Type |
---|---|
host |
up, down, downtime |
service |
ok, warning, critical, unknown, downtime |
Multiple event adjustments on the same host or service cannot overlap, except if the event type of one of the adjustments is downtime. If a new or modified event does overlap the time bounds of an existing adjustment, NetEye will report an error and the new event adjustment will not be processed.
The Event Adjustment Web Interface¶
Whether event adjustments will be considered or not during report generation can be set with the flag “Consider Event Adjustments” on the associated SLA Contract. This will be taken as the default behavior for any reports produced for that contract. The value selected for this flag may be overridden in the Reporting module by users who are granted the permissions described below.
Viewing Permissions
By default, only users with the admins role can access the SLM module. Non-admin users who need to view an SLM report will need special permissions to access or modify this flag or the other items (i.e., Contracts, customers, and SLA Types) in the SLM Module. To grant these permissions to users, you need to create a role (go under
) with a suitable permission (like e.g., report-adjustment-override or admin) over the SLM module. Enabling only General Module Access permission will give only View Access to slm Event Adjustment.To set these permission for a non-admin user requires first to enable the General Module Access permission for the SLM module.
Creating an Event Adjustment¶
To add a new event adjustment, go to
and enter values for the following options:
Object Type: Type of the monitoring object, can be host or service.
Host Name: Name of the host to which to attach the event.
Service Description: Name of the service, running on host passed in the Host Name field, to which to attach the event
Description: Title for the event
Start: Timestamp for the starting point of the event (YYYY-MM-DD hh:mm:ss)
End: Timestamp for the ending point of the event (YYYY-MM-DD hh:mm:ss)
Event Type: State for the event; The event type must be one of the values in Table 16 that are available for the monitored object passed in the Host Name or Service Description field.
Alternatively, Event Adjustments can also be created starting from any existing Icinga 2 Event in the Monitoring, from the Event Details page.
Advance Search Filter
It is possible for a user to search event adjustments, according to their requirements using the search filter that supports search on the basis of hostname, service, description, start/end time or event type.
The Event Adjustment CLI Command¶
The event adjustment feature is also available through the CLI. Below you can find detailed descriptions of the available commands and their parameters.
Note
All timestamps in the commands below must be in the format YYYY-MM-DD hh:mm:ss and be expressed in your local timezone as set in PHP during the initial configuration.
Create
The create command lets you create a new event adjustment for a particular Monitored Object (host or service).
Usage:
# icingacli slm adjustments create [parameters]
Available Parameters:
- –host-name:
(mandatory) Name of the host to which attach the event
- –service-description:
(optional) Name of the service, running on host $host-name, to which to attach the event
- –description:
(mandatory) Title for the event
- –start:
(mandatory) Timestamp for the starting point of the event
- –end:
(mandatory) Timestamp for the ending point of the event
- –event-type:
(optional) State for the event; if not explicitly defined it will be automatically set to downtime. The event type must be one of the values in the table above that is available for the monitored object passed in the $host-name or $service-description parameters.
Example
I want to create an event adjustment for the host “my-host” to specify that this host was up and running yesterday night from 1 AM to 3 AM.
I then execute the following command:
icingacli slm adjustments create --host-name="my-host" --description="Wrong host state" --start="2019-12-18 01:00:00" --end="2019-12-18 03:00:00" --event-type="up"
List
The list command lets you see existing event adjustments. The output will be a JSON object.
Usage:
# icingacli slm adjustments list
Edit
The edit command lets you alter the starting or ending time of an existing event adjustment given that adjustment’s ID, which you can obtain from the list command. Note that you cannot change the host or service name filters this way - you will have to delete and recreate the event adjustment. Also, if neither the –start nor the –end parameters are included, the event adjustment will not be changed.
Usage:
# icingacli slm adjustments edit [parameters]
Available Parameters:
- –id:
(mandatory) The ID of the adjustment to change
- –start:
(optional) Timestamp for the starting point of the event
- –end:
(optional) Timestamp for the ending point of the event
- –event-type:
(optional) State for the event. The event type must be one of the values in Table 16 above that are available for the monitored object pointed to in the event adjustment.
Delete
The delete command lets you delete an existing event adjustment given that adjustment’s ID, which you can obtain from the list command.
Usage:
# icingacli slm adjustments delete [parameters]
Available Parameters:
- –id:
(mandatory) The ID of the adjustment to change