Continued Setup

This commit is contained in:
2025-11-05 17:55:25 -06:00
parent 3456436539
commit 965811ba11
806 changed files with 284707 additions and 12 deletions

View File

@@ -0,0 +1,15 @@
SELECT
DATE_FORMAT(CONVERT_TZ(e.EventTimeStamp, '+00:00', '-05:00'), '%m/%d/%Y %h:%i:%s %p') eventTime,
e.SourceName as SourceName,
e.Message as DisplayPath,
REVERSE(INSERT(Reverse(Trim(CONCAT(CASE WHEN e.Active <> 0 THEN "Active, " ELSE "" END, CASE WHEN e.Acked <> 0 THEN "Acknowledged, " ELSE "" END, CASE WHEN e.Suppressed <> 0 THEN "Suppressed, " ELSE "" END, CASE WHEN e.Shelved <> 0 THEN "Shelved, " ELSE "" END))), 1, 1, "")) as States,
CASE WHEN e.Priority = 0 THEN 'Diagnostic' WHEN e.Priority = 1 THEN 'Low' WHEN e.Priority = 2 THEN 'Medium' WHEN e.Priority = 3 THEN 'High' WHEN e.Priority = 4 THEN 'Critical' ELSE '' END Priority,
e.Tag1Value eventValue,
e.PersonID as ackUser
FROM
allevent e
WHERE
e.EventTimeStamp BETWEEN :startDate AND :endDate AND Priority BETWEEN :minPriority AND :maxPriority AND
((:active AND e.Active = True) OR (:ack AND e.Acked = True))
ORDER BY e.EventTimeStamp DESC
LIMIT :limit

View File

@@ -0,0 +1,75 @@
{
"scope": "DG",
"version": 2,
"restricted": false,
"overridable": true,
"files": [
"query.sql"
],
"attributes": {
"useMaxReturnSize": false,
"autoBatchEnabled": false,
"fallbackValue": "",
"maxReturnSize": 100,
"cacheUnit": "SEC",
"type": "Query",
"enabled": true,
"cacheAmount": 1,
"cacheEnabled": false,
"database": "",
"fallbackEnabled": false,
"lastModificationSignature": "37fb1cc3397bcab6919db02c45977d1896722478e26671373824f5f6d6b1672b",
"permissions": [
{
"zone": "",
"role": ""
}
],
"lastModification": {
"actor": "admin",
"timestamp": "2025-11-05T22:39:10Z"
},
"parameters": [
{
"type": "Parameter",
"identifier": "startDate",
"sqlType": 8
},
{
"type": "Parameter",
"identifier": "endDate",
"sqlType": 8
},
{
"type": "Parameter",
"identifier": "active",
"sqlType": 6
},
{
"type": "Parameter",
"identifier": "clear",
"sqlType": 6
},
{
"type": "Parameter",
"identifier": "ack",
"sqlType": 6
},
{
"type": "Parameter",
"identifier": "limit",
"sqlType": 2
},
{
"type": "Parameter",
"identifier": "minPriority",
"sqlType": 2
},
{
"type": "Parameter",
"identifier": "maxPriority",
"sqlType": 2
}
]
}
}

View File

@@ -0,0 +1,18 @@
SELECT
DATE_FORMAT(e.eventTime, '%m/%d/%Y %h:%i:%s %p') eventTime,
e.displayPath,
SUBSTRING_INDEX(source, '/alm:', -1) name,
e.eventType,
CASE WHEN e.priority = 0 THEN 'Diagnostic' WHEN e.priority = 1 THEN 'Low' WHEN e.priority = 2 THEN 'Medium' WHEN e.priority = 3 THEN 'High' WHEN e.priority = 4 THEN 'Critical' ELSE '' END priority,
COALESCE(COALESCE(COALESCE(d.intvalue, d.floatvalue), d.strvalue), '') eventValue,
COALESCE(ack.strvalue, '') ackUser
FROM
alarm_events e
LEFT JOIN alarm_event_data d ON d.id = e.id AND d.propname = 'eventValue'
LEFT JOIN alarm_event_data ack ON ack.id = e.id AND ack.propname = 'ackUser'
WHERE
eventtime BETWEEN :startDate AND :endDate AND priority BETWEEN :minPriority AND :maxPriority AND
((:active AND e.eventtype = 0) OR (:clear AND e.eventtype = 1) OR (:ack AND e.eventtype = 2))
ORDER BY
e.eventTime DESC
LIMIT :limit

View File

@@ -0,0 +1,75 @@
{
"scope": "DG",
"version": 2,
"restricted": false,
"overridable": true,
"files": [
"query.sql"
],
"attributes": {
"useMaxReturnSize": false,
"autoBatchEnabled": false,
"fallbackValue": "",
"maxReturnSize": 100,
"cacheUnit": "SEC",
"type": "Query",
"enabled": true,
"cacheAmount": 1,
"cacheEnabled": false,
"database": "",
"fallbackEnabled": false,
"lastModificationSignature": "340378e09d18ae2e4dd37b9c252822113a192b186683064558c74ac671698700",
"permissions": [
{
"zone": "",
"role": ""
}
],
"lastModification": {
"actor": "admin",
"timestamp": "2025-11-05T22:39:10Z"
},
"parameters": [
{
"type": "Parameter",
"identifier": "startDate",
"sqlType": 8
},
{
"type": "Parameter",
"identifier": "endDate",
"sqlType": 8
},
{
"type": "Parameter",
"identifier": "active",
"sqlType": 6
},
{
"type": "Parameter",
"identifier": "clear",
"sqlType": 6
},
{
"type": "Parameter",
"identifier": "ack",
"sqlType": 6
},
{
"type": "Parameter",
"identifier": "limit",
"sqlType": 2
},
{
"type": "Parameter",
"identifier": "minPriority",
"sqlType": 2
},
{
"type": "Parameter",
"identifier": "maxPriority",
"sqlType": 2
}
]
}
}

View File

@@ -0,0 +1,27 @@
SELECT
(CASE a.priority
WHEN 1 THEN "Low"
WHEN 2 THEN "Medium"
WHEN 3 THEN "High"
WHEN 4 THEN "Critical"
ELSE "Diagnostic"
END) as "Priority",
SUM(CASE WHEN c.eventtime IS NULL THEN 1 ELSE 0 END) active,
SUM(CASE WHEN c.eventtime IS NULL THEN 0 ELSE 1 END) cleared,
SUM(CASE WHEN k.eventtime IS NULL THEN 1 ELSE 0 END) unacknowledged,
COUNT(*) total,
AVG(CASE WHEN k.eventtime IS NULL THEN 0 ELSE TIMESTAMPDIFF(SECOND, a.eventtime, COALESCE(k.eventtime, CURRENT_TIMESTAMP)) END) acknowledgeTime,
AVG(CASE WHEN c.eventtime IS NULL THEN 0 ELSE TIMESTAMPDIFF(SECOND, a.eventtime, COALESCE(c.eventtime, CURRENT_TIMESTAMP)) END) clearTime,
SUM(TIMESTAMPDIFF(SECOND, a.eventtime, COALESCE(c.eventtime, CURRENT_TIMESTAMP))) totalTime
FROM
alarm_events a
LEFT JOIN alarm_events c ON c.eventid = a.eventid AND c.eventtype = 1
LEFT JOIN alarm_events k ON k.eventid = a.eventid AND k.eventtype = 2
WHERE
a.eventtime
BETWEEN :startDate AND :endDate
AND a.eventtype = 0
GROUP BY
a.priority
ORDER BY
a.priority ASC

View File

@@ -0,0 +1,45 @@
{
"scope": "DG",
"version": 2,
"restricted": false,
"overridable": true,
"files": [
"query.sql"
],
"attributes": {
"useMaxReturnSize": false,
"autoBatchEnabled": false,
"fallbackValue": "",
"maxReturnSize": 100,
"cacheUnit": "SEC",
"type": "Query",
"enabled": true,
"cacheAmount": 1,
"cacheEnabled": false,
"database": "",
"fallbackEnabled": false,
"lastModificationSignature": "42dd33c879db17f0e97a2a368ab2edabd5e05ac606f97563030207a183350c9a",
"permissions": [
{
"zone": "",
"role": ""
}
],
"lastModification": {
"actor": "admin",
"timestamp": "2025-11-05T22:39:10Z"
},
"parameters": [
{
"type": "Parameter",
"identifier": "startDate",
"sqlType": 7
},
{
"type": "Parameter",
"identifier": "endDate",
"sqlType": 7
}
]
}
}

View File

@@ -0,0 +1,19 @@
SELECT
a.priority,
SUM(CASE WHEN c.eventtime IS NULL THEN 1 ELSE 0 END) active,
SUM(CASE WHEN c.eventtime IS NULL THEN 0 ELSE 1 END) cleared,
SUM(CASE WHEN k.eventtime IS NULL THEN 1 ELSE 0 END) unacknowledged,
COUNT(*) total,
AVG(CASE WHEN k.eventtime IS NULL THEN 0 ELSE TIMESTAMPDIFF(SECOND, a.eventtime, COALESCE(k.eventtime, CURRENT_TIMESTAMP)) END) acknowledgeTime,
AVG(CASE WHEN c.eventtime IS NULL THEN 0 ELSE TIMESTAMPDIFF(SECOND, a.eventtime, COALESCE(c.eventtime, CURRENT_TIMESTAMP)) END) clearTime,
SUM(TIMESTAMPDIFF(SECOND, a.eventtime, COALESCE(c.eventtime, CURRENT_TIMESTAMP))) totalTime
FROM
alarm_events a
LEFT JOIN alarm_events c ON c.eventid = a.eventid AND c.eventtype = 1
LEFT JOIN alarm_events k ON k.eventid = a.eventid AND k.eventtype = 2
WHERE
a.eventtime BETWEEN :startDate AND :endDate AND a.eventtype = 0
GROUP BY
a.priority
ORDER BY
a.priority ASC

View File

@@ -0,0 +1,45 @@
{
"scope": "DG",
"version": 2,
"restricted": false,
"overridable": true,
"files": [
"query.sql"
],
"attributes": {
"useMaxReturnSize": false,
"autoBatchEnabled": false,
"fallbackValue": "",
"maxReturnSize": 100,
"cacheUnit": "SEC",
"type": "Query",
"enabled": true,
"cacheAmount": 1,
"cacheEnabled": false,
"database": "",
"fallbackEnabled": false,
"lastModificationSignature": "1181d784ffa7fad34e065fed7f3facd2bf0f43f0da837d1c7ec1e43637bb3bc6",
"permissions": [
{
"zone": "",
"role": ""
}
],
"lastModification": {
"actor": "admin",
"timestamp": "2025-11-05T22:39:10Z"
},
"parameters": [
{
"type": "Parameter",
"identifier": "startDate",
"sqlType": 8
},
{
"type": "Parameter",
"identifier": "endDate",
"sqlType": 8
}
]
}
}

View File

@@ -0,0 +1,13 @@
SELECT
HOUR(a.eventtime) label,
COUNT(*) total,
SUM(TIMESTAMPDIFF(SECOND, a.eventtime, COALESCE(c.eventtime, CURRENT_TIMESTAMP))) duration
FROM
alarm_events a
LEFT JOIN alarm_events c ON c.eventid = a.eventid AND c.eventtype = 1
WHERE
a.eventtime BETWEEN :startDate AND :endDate AND a.eventtype = 0
GROUP BY
HOUR(a.eventtime)
ORDER BY
HOUR(a.eventtime) ASC

View File

@@ -0,0 +1,45 @@
{
"scope": "DG",
"version": 2,
"restricted": false,
"overridable": true,
"files": [
"query.sql"
],
"attributes": {
"useMaxReturnSize": false,
"autoBatchEnabled": false,
"fallbackValue": "",
"maxReturnSize": 100,
"cacheUnit": "SEC",
"type": "Query",
"enabled": true,
"cacheAmount": 1,
"cacheEnabled": false,
"database": "",
"fallbackEnabled": false,
"lastModificationSignature": "19b2eab0c03356a913b1442e185d1f6c6c71b89b541b2a3fb3413fd448aa0901",
"permissions": [
{
"zone": "",
"role": ""
}
],
"lastModification": {
"actor": "admin",
"timestamp": "2025-11-05T22:39:09Z"
},
"parameters": [
{
"type": "Parameter",
"identifier": "startDate",
"sqlType": 8
},
{
"type": "Parameter",
"identifier": "endDate",
"sqlType": 8
}
]
}
}

View File

@@ -0,0 +1,13 @@
SELECT
CASE WHEN a.displaypath = '' THEN 'Unknown' ELSE a.displaypath END displaypath,
SUM(TIMESTAMPDIFF(SECOND, a.eventtime, COALESCE(c.eventtime, CURRENT_TIMESTAMP))) duration
FROM
alarm_events a
LEFT JOIN alarm_events c ON c.eventid = a.eventid AND c.eventtype = 1
WHERE
a.eventtime BETWEEN :startDate AND :endDate AND a.eventtype = 0
GROUP BY
a.displaypath
ORDER BY
duration DESC, a.displaypath ASC
LIMIT :limit

View File

@@ -0,0 +1,50 @@
{
"scope": "DG",
"version": 2,
"restricted": false,
"overridable": true,
"files": [
"query.sql"
],
"attributes": {
"useMaxReturnSize": false,
"autoBatchEnabled": false,
"fallbackValue": "",
"maxReturnSize": 100,
"cacheUnit": "SEC",
"type": "Query",
"enabled": true,
"cacheAmount": 1,
"cacheEnabled": false,
"database": "",
"fallbackEnabled": false,
"lastModificationSignature": "e3f9129ad9bd3cdd0d5858d9b37c76aecaed9ff6a96d59a644a339a1fd01aec9",
"permissions": [
{
"zone": "",
"role": ""
}
],
"lastModification": {
"actor": "admin",
"timestamp": "2025-11-05T22:39:10Z"
},
"parameters": [
{
"type": "Parameter",
"identifier": "startDate",
"sqlType": 8
},
{
"type": "Parameter",
"identifier": "endDate",
"sqlType": 8
},
{
"type": "Parameter",
"identifier": "limit",
"sqlType": 2
}
]
}
}

View File

@@ -0,0 +1,12 @@
SELECT
CASE WHEN a.displaypath = '' THEN 'Unknown' ELSE a.displaypath END displaypath,
COUNT(*) cnt
FROM
alarm_events a
WHERE
a.eventtime BETWEEN :startDate AND :endDate AND a.eventtype = 0
GROUP BY
a.displaypath
ORDER BY
cnt DESC, a.displaypath ASC
LIMIT :limit

View File

@@ -0,0 +1,50 @@
{
"scope": "DG",
"version": 2,
"restricted": false,
"overridable": true,
"files": [
"query.sql"
],
"attributes": {
"useMaxReturnSize": false,
"autoBatchEnabled": false,
"fallbackValue": "",
"maxReturnSize": 100,
"cacheUnit": "SEC",
"type": "Query",
"enabled": true,
"cacheAmount": 1,
"cacheEnabled": false,
"database": "",
"fallbackEnabled": false,
"lastModificationSignature": "9d1d4b1c60d608eee1beecc92dc694b8442cee78174daba9cecddbff6e5b52db",
"permissions": [
{
"zone": "",
"role": ""
}
],
"lastModification": {
"actor": "admin",
"timestamp": "2025-11-05T22:39:10Z"
},
"parameters": [
{
"type": "Parameter",
"identifier": "startDate",
"sqlType": 8
},
{
"type": "Parameter",
"identifier": "endDate",
"sqlType": 8
},
{
"type": "Parameter",
"identifier": "limit",
"sqlType": 2
}
]
}
}

View File

@@ -0,0 +1,12 @@
SELECT
CASE WHEN a.displaypath = '' THEN 'Unknown' ELSE a.displaypath END displaypath,
SUM(TIMESTAMPDIFF(SECOND, a.eventtime, COALESCE(c.eventtime, CURRENT_TIMESTAMP))) total
FROM
alarm_events a
LEFT JOIN alarm_events c ON c.eventid = a.eventid AND c.eventtype = 1
WHERE
a.eventtime BETWEEN :startDate AND :endDate AND a.eventtype = 0
GROUP BY
a.displaypath
ORDER BY total DESC
LIMIT 1

View File

@@ -0,0 +1,45 @@
{
"scope": "DG",
"version": 2,
"restricted": false,
"overridable": true,
"files": [
"query.sql"
],
"attributes": {
"useMaxReturnSize": false,
"autoBatchEnabled": false,
"fallbackValue": "",
"maxReturnSize": 100,
"cacheUnit": "SEC",
"type": "Query",
"enabled": true,
"cacheAmount": 1,
"cacheEnabled": false,
"database": "",
"fallbackEnabled": false,
"lastModificationSignature": "7f21d69c6d3e5b30e52bfa459986e75e506189b6e0961afef6b217ef63253be7",
"permissions": [
{
"zone": "",
"role": ""
}
],
"lastModification": {
"actor": "admin",
"timestamp": "2025-11-05T22:39:10Z"
},
"parameters": [
{
"type": "Parameter",
"identifier": "startDate",
"sqlType": 8
},
{
"type": "Parameter",
"identifier": "endDate",
"sqlType": 8
}
]
}
}

View File

@@ -0,0 +1,11 @@
SELECT
CASE WHEN a.displaypath = '' THEN 'Unknown' ELSE a.displaypath END displaypath,
COUNT(*) total
FROM
alarm_events a
WHERE
a.eventtime BETWEEN :startDate AND :endDate AND a.eventtype = 0
GROUP BY
a.displaypath
ORDER BY total DESC
LIMIT 1

View File

@@ -0,0 +1,45 @@
{
"scope": "DG",
"version": 2,
"restricted": false,
"overridable": true,
"files": [
"query.sql"
],
"attributes": {
"useMaxReturnSize": false,
"autoBatchEnabled": false,
"fallbackValue": "",
"maxReturnSize": 100,
"cacheUnit": "SEC",
"type": "Query",
"enabled": true,
"cacheAmount": 1,
"cacheEnabled": false,
"database": "",
"fallbackEnabled": false,
"lastModificationSignature": "6a0d458d37c835ed5aabdd20568c8356396b3857d80909ff823d321b50922001",
"permissions": [
{
"zone": "",
"role": ""
}
],
"lastModification": {
"actor": "admin",
"timestamp": "2025-11-05T22:39:10Z"
},
"parameters": [
{
"type": "Parameter",
"identifier": "startDate",
"sqlType": 8
},
{
"type": "Parameter",
"identifier": "endDate",
"sqlType": 8
}
]
}
}

View File

@@ -0,0 +1,18 @@
SELECT
audit_events_id,
TO_CHAR(event_timestamp, 'FMМM/FMDD/YY FMHH12:MI:SS AM') event_timestamp,
actor,
action,
action_target,
action_value,
actor_host,
status_code,
originating_system,
originating_context
FROM
audit_events
WHERE
event_timestamp BETWEEN :startDate AND :endDate AND
(:search = '' OR (:search != '' AND (actor LIKE :search OR action LIKE :search OR action_target LIKE :search)))
ORDER BY
audit_events_id DESC

View File

@@ -0,0 +1,50 @@
{
"scope": "DG",
"version": 2,
"restricted": false,
"overridable": true,
"files": [
"query.sql"
],
"attributes": {
"useMaxReturnSize": false,
"autoBatchEnabled": false,
"fallbackValue": "",
"maxReturnSize": 100,
"cacheUnit": "SEC",
"type": "Query",
"enabled": true,
"cacheAmount": 1,
"cacheEnabled": false,
"database": "dcframe-db",
"fallbackEnabled": false,
"lastModificationSignature": "fe98a4bc761e86db97a3ad23e67e090bd580c5d65446829b6cdc0aee7c5518bb",
"permissions": [
{
"zone": "",
"role": ""
}
],
"lastModification": {
"actor": "admin",
"timestamp": "2025-11-05T22:55:32Z"
},
"parameters": [
{
"type": "Parameter",
"identifier": "startDate",
"sqlType": 8
},
{
"type": "Parameter",
"identifier": "endDate",
"sqlType": 8
},
{
"type": "Parameter",
"identifier": "search",
"sqlType": 7
}
]
}
}