Editor
Run
Format
Save
Clone
Wizard
Templates
chart-basic
bar
bar-horizontal
box
calendar
calendar-thresholds
chart
chart-alert
chart-column
chart-combo
chart-computed
chart-dual-axis
chart-range
chart-stack
chart-threshold
alert-console
message-console
gauge
graph
pie
property
table
table-grid
text
treemap
histogram
Source: Random
ATSD NUR
ATSD HBS
Random
1
1
[configuration] height-units = 1 width-units = 1 update-interval = 5 second entity = 10.102.0.15 metric = dbqueuemonitor list databases = Risk01, Risk012, Risk02, Risk03, Risk04, Risk05, Risk06, CorpFinance, Credit01, Credit02, Credit03, Credit04, Credit05, Credit06, Credit07, Credit08, Mortgage01, Mortgage02, Mortgage03, Trading01, Trading02, Trading03, Trading04, Trading05 endlist var metrics = [ { label: "KTB_DEBUG_FLAGS_Ora11 __DB__", alert: 70 }, { label: "Oracle archive log monitor __DB__", alert: 70 }, { label: "Oracle datafiles count limit __DB__", alert: 80 }, { label: "Oracle force_logging monitor __DB__", alert: 50 }, { label: "Oracle invalid objects and unusable indexes monitor __DB__", alert: 70 }, { label: "Oracle job_queue_processes monitor __DB__", alert: 70 }, { label: "Oracle ping monitor __DB__", alert: 40 }, { label: "Oracle redo log monitor __DB__", alert: 90 }, { label: "Oracle session util __DB__ percent", alert: 70 }, { label: "Oracle session util percent __DB__", alert: 60 }, { label: "Oracle TS_MGMT monitor __DB__", alert: 70 }, { label: "Oracle сheck_parameters monitor __DB__", alert: 40 } ] endvar script # find substring, which is present in the database list getDB = function(str) { # sort copy of 'databases' and insert in config as string return @{JSON.stringify(databases.slice(0).sort(function(a,b) {return b.length - a.length}) )} .some(function(db) { return str.indexOf(db) >= 0; }) } endscript [group] [widget] type = table title = Database Summary Status column-entity = null column-metric = null column-time = null merge-columns = getDB(a.tags.target[0]) === getDB(b.tags.target[0]) ? 'target' : null; [column] key = target label = Database format = return getDB(value) style = padding: 5px 2px 5px 2px; for m in metrics [column] label = "@{m.label}".replace(/\s?__DB__/, "").replace(/\s+/g, '\n').replace(/_+/g, '\n') key = value value = row.map["@{m.label}".replace("__DB__", getDB(Object.keys(row.map)[0]))] title = alert threshold: @{m.alert} style = padding: 5px 2px 5px 2px; # hide the row, if none of the series in the row has an alert row-style = row.series.some(function(s) { return s.vars.values.alertExp}) ? "": "display: none" alert-expression = (value > @{m.alert}) ? 2 : 1 alert-style = alert == 2 ? 'background-color: red' : 'background-color: #8DB600' endfor for db in databases for m in metrics [series] alert-expression = (value > @{m.alert}) [tags] target = @{m.label.replace("__DB__", db)} endfor endfor