Hello,
is there a way for me to manually enter a ticket here. IE let's say I create a ticket and want to show up here instead of when it's auto-generated by the integration?
No, that is not how this function works. This widget will only display incidents that have been generated by the Orion alerting engine.
If you want to create something more than this, you may be able to do so via the Custom HTML widget, by creating some Javascript code that pulls data from the SNOW API for display.
The incident data from the SNOW integration is stored in the SWQL entity Orion.ESI.AlertIncident, so have a look at this entity to see the data you can access, but the following query may be a starting point for you:
SELECT a.AlertConfigurations.Name, a.EntityCaption, a.AlertActive.TriggeredDateTime, a.AlertActive.TriggeredMessage, a.AlertIncident.IncidentID FROM Orion.AlertObjects a WHERE a.AlertIncident.IncidentID IS NOT NULL
I Basically want a kpi widget that shows the number of service now tickets - thanks
Did you have a look at the Orion.ESI.AlertIncident SWQL entity to see what data exists?
If you have SWQL Studio installed use that. If not and if you are not likely to do much custom querying, then navigate to the following URL
https://<servername>/Orion/Admin/swis.aspx
Delete the default query and in the Generate Query drop down, select the Orion.ESI.AlertIncident entry and click Generate. This will show all of the columns and the data within it. Identify the column that has the SNOW Incident ID's in it. You can then update the query above to use that or for the count of Incidents Orion has integrated to create:
SELECT COUNT(ID)
FROM Orion.ESI.AlertIncident
WHERE <ColumnNamewithSNOWID> IS NOT NULL
I do not have access to instance with such data currently to confirm I am afraid, but this should get you where you need to go.
Replace in the following SWQL query the name of the column in the Orion.ESI.AlertIncident entity, which is storing the IncidentID. I do not have output in front of me, but from memory it was the IncidentID field. This query will output the number of alerts which have an Incident ID from SNOW it has collected as part of the alert integration.
SELECT COUNT(ID) AS IncidentCount
FROM Orion.ESI.AlertIncident
WHERE <ColumnNamewithSNOWID> IS NOT NULL
It is worthwhile you looking at the basics of SQL/SWQL, as if you have this requirement now you are going to have more in future. The following is the standard place to start learning - https://www.w3schools.com/sql/sql_where.asp
In the following adjustment to the previous statement, you can see I have added an AND, which means both the IncidentID field is not empty and the state field must equal a value, where you replace <value> with the value that equates to the ticket still being open.
SELECT COUNT(ID) AS IncidentCount FROM Orion.ESI.AlertIncident WHERE IncidentID IS NOT NULL AND State = '<value>'
SELECT COUNT(ID) AS IncidentCount
FROM Orion.ESI.AlertIncident
WHERE IncidentID IS NOT NULL AND State = '<Open>'
SolarWinds solutions are rooted in our deep connection to our user base in the THWACK® online community. More than 195,000 members are here to solve problems, share technology and best practices, and directly contribute to our product development process.