Auditing
Auditing allows you to explore how your users interact with the DS for SCOM product.
How to configure auditing
Prerequisites
- MS SQL Server 2016 and above
- A new empty SQL database. DS for SCOM writes its audit entries to a table which is automatically created in this database.
- The SquaredUp application pool account needs the db_owner permission on the database, as it needs to create the table schema. The connection is established using the IIS worker process identity.
SquaredUp DS uses the application pool identity account to retrieve data, NOT the account with which you log on to SquaredUp DS. By default the application pool identity is set to NetworkService, but you may have changed this. See How to check and modify the application pool identity and make a note of the application pool identity account for use in the next steps:
- If the application pool identity is running as a custom account then add the relevant roles for this custom account.
- If the application pool is set to NETWORK SERVICE and SquaredUp DS is installed on the same server as the database you are accessing then add the relevant role for the NT AUTHORITY\NETWORK SERVICE account.
- If the application pool is set to NETWORK SERVICE and SquaredUp DS is NOT installed on the same server as the database you are accessing then add the relevant role for the SquaredUp server's AD computer account (for example,
domain\mywebserver$
)
To set up auditing:
- In DS for SCOM browse to ≡ > System > Auditing
- Specify your connection string, in this format:
Server=<SQLservername>;Database=<AuditingDatabaseName>;Trusted_Connection=True;
- Click apply changes > Enable > confirm.
- Add the Audit dashboard pack (if you have an EAM edition license or above) by clicking the Import Audit Pack button a the bottom of the System > Auditing page. The Auditing dashboards will appear on the navigation bar for admins. Alternatively, you can explore the auditing information on the fly by clicking Explore see Audit Explorer.
When auditing is first setup it will automatically create a new SQL table named AuditEvent
with the following schema:
On the auditing systems page you can also configure which type of events you wish to audit.
By default, only Session and Write events are logged. Read events (viewing dashboards) can be enabled manually.
Auditing currently supports the following events:
Using Auditing
Auditing dashboard pack
An EAM edition license (or above) is required for this feature. To upgrade please contact [email protected].
To check the license edition you are using see How to check which license key is being used. To see what is included in different product edition licenses see the Licensing Overview.
The dashboards added by the Auditing Dashboard Pack allow admins to view commonly used auditing information, such as users, dashboards and perspectives, folders, Enterprise Applications and Administration information. These dashboards can of course be edited or you can create your own new dashboards.
Creating SQL tiles using the Audit SQL provider
An EAM edition license (or above) is required for this feature. To upgrade please contact [email protected].
To check the license edition you are using see How to check which license key is being used. To see what is included in different product edition licenses see the Licensing Overview.
When auditing is enabled for the first time a new SQL Provider is added to the ≡ > System > Integrations page named Audit. This allows you to create SQL tiles targeting the auditing database. It has a special connection string that follows the connection string configured in the ≡ > System > Auditing page.
Audit Explorer
You can also explore auditing information by creating graphs on the fly, using the Explore button at the bottom of the ≡ > System > Auditing page or the explore audit events button at the top of the auditing dashboards. The data and graph can also be exported to Excel.
- Search:
Select the type of object you'd like to show auditing data about, and then enter the name of the object:
This searches the audit database, rather than the live SquaredUp environment. This means an existing dashboard that has not yet had an audit event will not be returned in the search results. However, a dashboard that is no longer present in the product, but has an audit event regarding its deletion, will be searchable.- User - Enter a username
- Content - Enter a dashboard or perspective name
- Team Folder - Enter the name of a Team Folder
- Enterprise Application - Enter the EA name
- Filter:
Optionally, you can filter further by selecting from the dynamically generated dropdown list, or leave it to the default setting to show all events. - Visualize:
Grid columns
Grid columns opens the grid designer, where you can show or hide columns, change the order of columns, edit column names or add custom columns.
Property names that contain hyphens (for example
properties.name-with-hyphens
) can't be processed due to a JavaScript limitation. If you want to use a property that contains a hyphen, you have two options:- If you have access to the data source and can change the name of the property, change the name of the property to a name without hyphens.
For example, if your Elasticsearch query uses a property (an aggregation, a grouping or any other property you want to use) with a name that contains a hyphen, you can either access your Elasticsearch instance and change the name there or you can overwrite the name in the query dsl field. - If you can't change the name of the property, you need to enter the property name in the following format:
Original property name:{{properties.name-with-hyphens.value}}
New format:{{properties['name-with-hyphens'].value}}
Grid options
Tip for column sizing: You can change the column width directly in the grid by clicking on the divider lines between columns and dragging them to the width you want. You need to show column headers (by activating the show column headers check box) to be able to change the column width.
Resizing columns while in edit mode affects how the grid looks by default when users open the dashboard. Users can temporarily change the column sizes by dragging them, but those changes only last until they leave the page.Key path
Specifying a key path allows you to customize the displayed value. For example,
username
, will display the username of the first result. Other possible key path values can be seen as column headers in the Grid view.Scalar
Color
Conditional formatting:
You can display the data in different colors based on values you define here. For example, you can display the data in green when the value is below 100 and in red when it is above 100.
- Click on add to configure a condition.
- Click on select color.... to open the color picker. Select the color for this condition.
- Enter your condition in the field next to the color. You can use the
value
property and manipulate it with JavaScript String and Regex APIs. When you click on the mustache picker, you'll get some examples:- Value is greater than something, less than something, etc.
For example:{{value < 10}}
(The color you pick will be used if the value is less than 10) - Value is present in the result (scalar tiles only)
For example:value.IndexOf('error') != -1
(The color you pick will be used if the string value "error" is present in the results) - Value matches one of the regular expressions you defined (scalar tiles only)
For example:value.match(/healthy|good|up/)
(The color you picked will be used if the string values arehealthy
,good
, orup
)
- Value is greater than something, less than something, etc.
Display:
Here you decide how the color is used:
Link options
Allows you to turn the graph item(s) into links. You can either enter plain text to create a fixed link (URL always stays the same) or use dynamic properties to create a dynamic link.
Dynamic links make use of dynamic properties which are inserted as part of the URL. This creates a template URL that will be resolved to an actual URL based on the items properties.
For example, if you want to link to tickets in your ticket system and the format of the URL for tickets in your system is
https://www.my-system/ticket-123
, where123
is the ticket ID, you can use the dynamic property that contains the ticket ID and enter the dynamic URLhttps://www.my-system/ticket-{{ticketID}}
.- For scalars, you can only use the dynamic property
value
in dynamic links, which means the link changes when the value of the scalar changes. Since a scalar is just one item, it would also make sense to use a fixed link, for example the link to the website of which you are displaying the response time. - For status icon or bars and the rows of a grid, you usually want to use a dynamic link since you get multiple items or rows that represent different things. You can use any of the dynamic properties the mustache picker offers you.
Dynamic mustache properties and values you need to change according to your instance are highlighted in bold.
ServiceNow incidents:
https://<your-instance>.service-now.com/nav_to.do?uri=%2Fincident.do%3Fsys_id%3D{{sys_id}}
PagerDuty incidents:
{{incident.html_url}}
Azure DevOps projects:
https://dev.azure.com/<your-instance>/{{name}}
Azure DevOps builds:
https://dev.azure.com/<your-instance>/_build/results?buildId={{id}}
Zendesk tickets:
https://<your-instance>.zendesk.com/agent/tickets/{{id}}
Azure Application Insights
https://portal.azure.com/#@squaredup.net/resource/{{ResourceId}}
Group
You can use mustache and JavaScript to group audit events. For example
{{operation}}
Data Range
The Data Range option allows you to choose the range of data the graph will display. For line graphs, this means the data on the y-axis.
Sort
Sort allows you to change the order of the results displayed. You can sort by value (ascending or descending) or label (alphabetically ascending or descending).
Value
Value formatter
Allows you to format the value by using the mustache picker. For example, you can round the value up or down or convert it.
Label
Allows you to change the label of the results.
Display
Vertical:
Tick this option to show vertical bars, otherwise horizontal bars are shown.
Bar width:
Allows you to set the width of the bars with a slider.
Color
Group
You can use mustache and JavaScript to group audit events. For example
{{operation}}
Sort
Sort allows you to change the order of the results displayed. You can sort by value (ascending or descending) or label (alphabetically ascending or descending).
Value formatter
Allows you to format the value by using the mustache picker. For example, you can round the value up or down or convert it.
Display
Size mode:
Show legend:
Allows you to show or hide the legend of the graph.
Table or Inline:
Show the legend as a separate table or as labels pointing to the segments. When using Inline you can also hide the segment values, and use the slider to change the size of the labels.
Show zero values in legend:
Will show legend items for values of zero which are otherwise missing from the donut.
Fixed height scrollable legend:
Sets the legend to a fixed height where you can scroll through the items. This means that the tile doesn't become too large if there are many items.
Display mode:
Allows you to switch between displaying absolute values or percentages.
Color palette:
Here you can choose between different color palettes.
Note: If there are more items than colors, the colors repeat from the beginning.
Tip for displaying priorities or health states: If you want to display priorities or health states from a data source that doesn't enrich the data with information about priority or health (like the SQL tile or external APIs), use the custom color option and map the results to the correct color. This way, you can make sure that healthy or low priority results are displayed in green, unhealthy or high priority results are displayed in red, etc. If you use the color palettes Priorities, Health1, or Health2 the colors get assigned depending on how the results are sorted, which doesn't guarantee that the colors make sense for the priority or state they represent.
Group
You can use mustache and JavaScript to group audit events. For example
{{operation}}
Threshold
You can choose to apply a threshold line at a specified value, and whether you wish to fill above or below this value, or just show the line. For example, for free disk space you might want to fill below the line to highlight when space goes below a particular threshold. For processor information you might want to fill above the line to highlight when processor percentage goes above that threshold. The threshold is also shown on the drilldown view.
Max, min, avg
When drilled-down to view a graph, you can select the min, max and avgoptions for each object (displayed to the right of the graph), which displays a line cutting horizontally across the graph a each of the selected value points.
Data range
The Data Range option allows you to choose the range of data the graph will display. For line graphs, this means the data on the y-axis.
Display
Height:
Allows you to set the height of the tile with a slider.
Show hover details:
Shows the value for all lines at any point you hover. There may not be a value exactly where you hover so the value is interpolated from the values either side.
Show points:
Shows where the data points are on the line. Useful to identify missing points, or detail for changing data.
Show trend
Enable the Show Trend Linestoggle to display a trend line for the line graph data. Disable the toggle to hide the trend line.
Custom colors:
You can display the data in different colors based on labels. For example, you can display data in green for a specific user.
- Click on select color.... to open the color picker. Select the color for this condition.
- Enter your condition in the field next to the color. You can use the
label
property and manipulate it with JavaScript String and Regex APIs. When you click on the mustache picker, you'll get some examples:- Condition is true if the label contains something
For example:{{label.indexOf('SQL') != -1}}
(The color you pick will be used if the label contains 'SQL') - Condition is true if the label contains multiple things
For example:{{label.match(/C:|D:|E:/) != null}}
(The color you pick will be used if the label contains 'C:', 'D:' or 'E:') - Condition is true if the label contains multiple things with multiple variations
For example:{{label.match(/^[Ss]erver[0-9]+$/) != null}}
(The color you pick will be used if the label is 'Server' or 'server' with a number after it)
- Condition is true if the label contains something
Label
Allows you to change the label of the results.
Show legend:
Allows you to show or hide the legend of the graph.
Label:
Group
You can use mustache and JavaScript to group audit events. For example
{{operation}}
Threshold
You can choose to apply a threshold line at a specified value, and whether you wish to fill above or below this value, or just show the line. For example, for free disk space you might want to fill below the line to highlight when space goes below a particular threshold. For processor information you might want to fill above the line to highlight when processor percentage goes above that threshold. The threshold is also shown on the drilldown view.
Data range
The Data Range option allows you to choose the range of data the graph will display. For line graphs, this means the data on the y-axis.
Display
Height:
Allows you to set the height of the tile with a slider.
Show hover details:
Shows the value for all lines at any point you hover. There may not be a value exactly where you hover so the value is interpolated from the values either side.
Solid bars:
Show the bars as solid color or translucent.
Custom colors:
You can display the data in different colors based on labels. For example, you can display data in green for a specific user.
- Click on select color.... to open the color picker. Select the color for this condition.
- Enter your condition in the field next to the color. You can use the
label
property and manipulate it with JavaScript String and Regex APIs. When you click on the mustache picker, you'll get some examples:- Condition is true if the label contains something
For example:{{label.indexOf('SQL') != -1}}
(The color you pick will be used if the label contains 'SQL') - Condition is true if the label contains multiple things
For example:{{label.match(/C:|D:|E:/) != null}}
(The color you pick will be used if the label contains 'C:', 'D:' or 'E:') - Condition is true if the label contains multiple things with multiple variations
For example:{{label.match(/^[Ss]erver[0-9]+$/) != null}}
(The color you pick will be used if the label is 'Server' or 'server' with a number after it)
- Condition is true if the label contains something
Label
Allows you to change the label of the results.
Show legend:
Allows you to show or hide the legend of the graph.
Label:
- If you have access to the data source and can change the name of the property, change the name of the property to a name without hyphens.
- Timeframe:
The timeframe picker at the top of the screen can be used to adjust the graph timeframe. Timeframes up to 12 months and custom are supported - Minimize the editor:
Beneath the config editor is an arrow , clicking this arrow will minimize the config panel, allowing the output to fill the screen. This is useful for taking screenshots of the result or for viewing more columns in a grid. - Export to Excel:
Auditing data can be exported to Excel using the Export to Excel button shown at the top right of the screen:
Troubleshooting Auditing
The current status of auditing can be viewed in ≡ > System > Auditing. Auditing can be in one of several states:
When auditing is not enabled the status will be as follows:
When auditing is enabled and functions correctly the following is displayed:
If auditing failed to startup correctly, which occurs during DS for SCOM starting up or an auditing configuration change, then no auditing will take place and a red banner will be displayed. Auditing can fail to start up for a number of reasons including misconfiguration or issues communicating with the SQL server. Here’s an example of what it can look like:
If one or more audit events failed to record correctly a warning message is displayed and it is noted in the DS for SCOM log, see Where to find log files. This can indicate auditing may or may not be working (for example the SQL server has unexpectedly become unavailable). The date and time of the last error is also included in the message. Here’s an example message:
Auditing in HA
Auditing is supported in HA mode and both DS for SCOM instances will read and write to the same audit table. The server that adds an audit entry is distinguished by the NodeId.
When changing settings (including enable/disable) in HA mode the settings are not automatically reflected on both servers. The server you change the settings on will be updated immediately, but you need to wait 1 minute then recycle the application pool of the other server to take effect. If you don’t recycle the application pool of the other server it will continue to use the old settings or have auditing in the incorrect state.