initial commit; version 22.5.12042

This commit is contained in:
2022-12-12 23:28:25 -05:00
commit af1b03d79f
17653 changed files with 22692970 additions and 0 deletions

16
includes/templates/README Normal file
View File

@ -0,0 +1,16 @@
Here place for default templates for alerts, groups and notifications.
DO NOT TOUCH files here!
Use user template overrides in main observium dir templates/
For example:
# change current dirrectory to your observium dir
cd /opt/observium
# copy (or create) new template from defaults, for example HTML email notifications:
cp includes/templates/notification/email_html.tpl templates/notification/
# edit copied file:
nano templates/notification/email_html.tpl

View File

@ -0,0 +1,18 @@
<?xml version="1.0"?>
<templates>
<template type="alert" description="Autogenerated observium template" version="0.9" created="Mon, 13 Jul 2015 01:06:01 +0300" observium="0.15.7.6621" id="0ad6da88da0d83faba4103225da00225">
<entity>device</entity>
<name>device rebooted</name>
<message>Device rebooted</message>
<severity>crit</severity>
<suppress_recovery>1</suppress_recovery>
<delay>0</delay>
<conditions_and>1</conditions_and>
<conditions>device_rebooted eq 1</conditions>
<conditions_complex>device_rebooted eq 1</conditions_complex>
<associations>
<device>*</device>
<entity>*</entity>
</associations>
</template>
</templates>

View File

@ -0,0 +1,122 @@
/**
* Observium
*
* This file is part of Observium.
*
* @package observium
* @subpackage templates
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2020 Observium Limited
*
*/
/**
* Used keys:
* ALERT_STATE, ALERT_URL, ALERT_MESSAGE, CONDITIONS, METRICS, DURATION,
* ENTITY_LINK, ENTITY_DESCRIPTION, ENTITY_GRAPHS,
* DEVICE_LINK, DEVICE_HARDWARE, DEVICE_OS, DEVICE_LOCATION, DEVICE_UPTIME
*/
<html>
<head>
<title>Observium Alert</title>
<style type="text/css">
body {
margin: 15px;
font-family: 'Source Sans Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-size: 14px;
line-height: 20px;
color: #333333;
background-color: #fff;
font-weight: 400;
}
.box {
position: relative;
-webkit-border-radius: 0px;
-moz-border-radius: 0px;
border-radius: 0px;
background: #ffffff;
/* border-top: 3px solid #d2d6de; */
margin-bottom: 10px;
wwidth: 100%;
box-shadow: 0 0 2px rgba(0, 0, 0, 0.12), 0 2px 4px rgba(0, 0, 0, 0.24);
}
.no-padding {
padding: 0 !important;
}
.table {
max-width: 600px;
background-color: #fff;
border-collapse: collapse;
border-spacing: 0;
color: #333;
}
.table th, .table td {
padding: 5px 10px;
line-height: 20px;
text-align: left;
vertical-align: top;
border-top: 1px solid #f4f4f4;
}
.table tbody > tr.ALERT > td {
background-color: #ffebee;
}
.table tbody > tr:nth-child(even) > td, .table tbody > tr:nth-child(even) > th {
background-color: #f9f9f9;
}
.table .state-marker, .state-marker {
padding: 0px;
margin: none;
width: 7px;
}
.table tbody > tr > td.state-marker {
background-color: #004774;
}
.table .ALERT .state-marker {
background-color: #b71c1c;
}
.header { font-size: 20px; font-weight: bold; padding: 10px;}
.ALERT {
color: #cc0000;
}
</style>
</head>
<body>
<table class="table box box-solid">
<tbody>
<tr class="{{ALERT_STATE}}"><td class="state-marker"></td><td style="padding: 10px;" class="header">{{ALERT_STATE}}</td><td><a style="float: right;" href="{{{ALERT_URL}}}">Modify</a></td></tr>
<tr><td colspan=2><strong>Alert</strong></td><td class="{{ALERT_STATE}}"><strong>{{ALERT_MESSAGE}}</strong></td></tr>
{{#ENTITY_LINK}}
<tr><td colspan=2><strong>Entity</strong></td><td><strong>{{{ENTITY_LINK}}}</strong></td></tr>
{{/ENTITY_LINK}}
{{#ENTITY_DESCRIPTION}}
<tr><td colspan=2><strong>Descr</strong></td><td>{{ENTITY_DESCRIPTION}}</td></tr>
{{/ENTITY_DESCRIPTION}}
{{#CONDITIONS}}
<tr><td colspan=2><strong>Conditions</strong></td><td>{{{CONDITIONS}}}</td></tr>
{{/CONDITIONS}}
<tr><td colspan=2><strong>Metrics</strong></td><td>{{{METRICS}}}</td></tr>
<tr><td colspan=2><strong>Duration</strong></td><td>{{DURATION}}</td></tr>
<tr><td colspan=3>Device</td></tr>
<tr><td colspan=2><strong>Device</strong></td><td><strong>{{{DEVICE_LINK}}}</strong>{{#DEVICE_DESCRIPTION}} ({{DEVICE_DESCRIPTION}}){{/DEVICE_DESCRIPTION}}</td></tr>
<tr><td colspan=2><strong>Hardware</strong></td><td>{{DEVICE_HARDWARE}}</td></tr>
<tr><td colspan=2><strong>Operating System</strong></td><td>{{DEVICE_OS}}</td></tr>
<tr><td colspan=2><strong>Location</strong></td><td>{{DEVICE_LOCATION}}</td></tr>
<tr><td colspan=2><strong>Uptime</strong></td><td>{{DEVICE_UPTIME}}</td></tr>
{{#ENTITY_GRAPHS}}
<tr><td colspan=3><center>{{{ENTITY_GRAPHS}}}</center></td></tr>
{{/ENTITY_GRAPHS}}
</tbody>
</table>
</body>
</html>

View File

@ -0,0 +1,40 @@
/**
* Observium
*
* This file is part of Observium.
*
* @package observium
* @subpackage templates
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2020 Observium Limited
*
*/
/**
* Used keys:
* ALERT_STATE, ALERT_URL, ALERT_MESSAGE, CONDITIONS, METRICS, DURATION,
* ENTITY_NAME, ENTITY_DESCRIPTION,
* DEVICE_HOSTNAME, DEVICE_HARDWARE, DEVICE_OS, DEVICE_LOCATION, DEVICE_UPTIME
*/
------------------------------------
{{ALERT_STATE}}
{{ALERT_MESSAGE}}
------------------------------------
{{#ENTITY_NAME}}
Entity: {{ENTITY_NAME}}
{{/ENTITY_NAME}}
{{#ENTITY_DESCRIPTION}}
Description: {{ENTITY_DESCRIPTION}}
{{/ENTITY_DESCRIPTION}}
{{#CONDITIONS}}
Conditions: {{{CONDITIONS}}}
{{/CONDITIONS}}
Metrics: {{METRICS}}
Duration: {{DURATION}}
------------------------------------
------------------------------------
Device: {{DEVICE_HOSTNAME}}{{#DEVICE_DESCRIPTION}} ({{DEVICE_DESCRIPTION}}){{/DEVICE_DESCRIPTION}}
Hardware: {{DEVICE_HARDWARE}}
OS: {{DEVICE_OS}}
Location: {{DEVICE_LOCATION}}
Uptime: {{DEVICE_UPTIME}}
------------------------------------

View File

@ -0,0 +1,38 @@
/**
* Observium
*
* This file is part of Observium.
*
* @package observium
* @subpackage templates
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2020 Observium Limited
*
*/
/**
* HTML formatting style: https://core.telegram.org/bots/api#html-style
* Supports only numeric html entities (&nbsp; == &#160;)
*/
{{#ENTITY_LINK}}
<b>Entity:</b> <b>{{{ENTITY_LINK}}}</b>
{{/ENTITY_LINK}}
{{#ENTITY_DESCRIPTION}}
<b>Description:</b> {{ENTITY_DESCRIPTION}}
{{/ENTITY_DESCRIPTION}}
// For syslog:
{{#SYSLOG_MESSAGE}}
<b>Message:</b> {{SYSLOG_MESSAGE}}
{{/SYSLOG_MESSAGE}}
// Common alerts:
{{^SYSLOG_MESSAGE}}
{{#CONDITIONS}}
<b>Conditions:</b> {{{CONDITIONS}}}
{{/CONDITIONS}}
<b>Metrics:</b> {{{METRICS}}}
{{/SYSLOG_MESSAGE}}
<b>Duration:</b> {{DURATION}}
<b>Device:</b> <b>{{{DEVICE_LINK}}}</b>{{#DEVICE_DESCRIPTION}} ({{DEVICE_DESCRIPTION}}){{/DEVICE_DESCRIPTION}}
<b>Location:</b> {{DEVICE_LOCATION}}
<b>Device Uptime:</b> {{DEVICE_UPTIME}}

View File

@ -0,0 +1,44 @@
/**
* Observium
*
* This file is part of Observium.
*
* @package observium
* @subpackage templates
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2020 Observium Limited
*
*/
/**
* https://core.telegram.org/bots/api#sendmessage
* Used keys:
* ALERT_STATE, ALERT_URL, ALERT_MESSAGE, DURATION,
* ENTITY_NAME, ENTITY_DESCRIPTION,
* DEVICE_HOSTNAME, DEVICE_UPTIME
*/
*{{ALERT_STATE}} : {{ALERT_MESSAGE}}*
_{{ALERT_TIMESTAMP}}_
{{#ENTITY_NAME}}
*Entity:* <{{ENTITY_URL}}|{{ENTITY_NAME}}>
{{/ENTITY_NAME}}
{{#ENTITY_DESCRIPTION}}
*Description:* {{ENTITY_DESCRIPTION}}
{{/ENTITY_DESCRIPTION}}
// For syslog:
{{#SYSLOG_MESSAGE}}
*Message:* {{SYSLOG_MESSAGE}}
{{/SYSLOG_MESSAGE}}
// Common alerts:
{{^SYSLOG_MESSAGE}}
{{#CONDITIONS}}
*Conditions:* {{{CONDITIONS}}}
{{/CONDITIONS}}
*Metrics:* {{{METRICS}}}
{{/SYSLOG_MESSAGE}}
*Duration:* {{DURATION}}
*Device:* <{{DEVICE_URL}}|{{DEVICE_HOSTNAME}}{{#DEVICE_DESCRIPTION}} ({{DEVICE_DESCRIPTION}}){{/DEVICE_DESCRIPTION}}>
*Location:* {{DEVICE_LOCATION}}
*Device Uptime:* {{DEVICE_UPTIME}}
*<{{ALERT_URL}}|More information>*

View File

@ -0,0 +1,40 @@
/**
* Observium
*
* This file is part of Observium.
*
* @package observium
* @subpackage templates
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2020 Observium Limited
*
*/
/**
* Used keys:
* ALERT_STATE, ALERT_URL, ALERT_MESSAGE, DURATION,
* ENTITY_NAME, ENTITY_DESCRIPTION,
* DEVICE_HOSTNAME, DEVICE_UPTIME
*/
{{ALERT_TIMESTAMP}}
{{#ENTITY_NAME}}
Entity: {{ENTITY_NAME}}
{{/ENTITY_NAME}}
{{#ENTITY_DESCRIPTION}}
Description: {{ENTITY_DESCRIPTION}}
{{/ENTITY_DESCRIPTION}}
// For syslog:
{{#SYSLOG_MESSAGE}}
Message: {{SYSLOG_MESSAGE}}
{{/SYSLOG_MESSAGE}}
{{#CONDITIONS}}
Conditions: {{{CONDITIONS}}}
{{/CONDITIONS}}
Metrics: {{METRICS}}
Duration: {{DURATION}}
Device: {{DEVICE_HOSTNAME}}{{#DEVICE_DESCRIPTION}} ({{DEVICE_DESCRIPTION}}){{/DEVICE_DESCRIPTION}}
Location: {{DEVICE_LOCATION}}
Device Uptime: {{DEVICE_UPTIME}}
More information: {{ALERT_URL}}

View File

@ -0,0 +1,43 @@
/**
* Observium
*
* This file is part of Observium.
*
* @package observium
* @subpackage templates
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2020 Observium Limited
*
*/
/**
* HTML formatting style: https://core.telegram.org/bots/api#html-style
* Supports only numeric html entities (&nbsp; == &#160;)
*/
// Keep more actual information in first 2 lines
{{#ALERT_EMOJI}}{{{ALERT_EMOJI}}}&#160;{{/ALERT_EMOJI}}<strong><a href="{{{ALERT_URL}}}">{{ALERT_MESSAGE}}</a></strong>
//<b>{{ALERT_STATE}} :</b> {{ALERT_MESSAGE}} (<a href="{{{ALERT_URL}}}">Modify</a>)
{{#ENTITY_LINK}}
<b>Entity:</b> <strong>{{{ENTITY_LINK}}}</strong>
{{/ENTITY_LINK}}
<em>{{ALERT_TIMESTAMP}}</em>
{{#ENTITY_DESCRIPTION}}
<b>Description:</b> {{ENTITY_DESCRIPTION}}
{{/ENTITY_DESCRIPTION}}
// For syslog:
{{#SYSLOG_MESSAGE}}
<b>Message:</b> {{SYSLOG_MESSAGE}}
{{/SYSLOG_MESSAGE}}
// Common alerts:
{{^SYSLOG_MESSAGE}}
{{#CONDITIONS}}
<b>Conditions:</b> {{{CONDITIONS}}}
{{/CONDITIONS}}
<b>Metrics:</b> {{{METRICS}}}
{{/SYSLOG_MESSAGE}}
//<b>Duration:</b> {{DURATION}}
<b>Device:</b> <strong>{{{DEVICE_LINK}}}</strong>{{#DEVICE_DESCRIPTION}} ({{DEVICE_DESCRIPTION}}){{/DEVICE_DESCRIPTION}}
<b>Location:</b> {{DEVICE_LOCATION}}
<b>Device Uptime:</b> {{DEVICE_UPTIME}}

View File

@ -0,0 +1,38 @@
/**
* Observium
*
* This file is part of Observium.
*
* @package observium
* @subpackage templates
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2020 Observium Limited
*
*/
/**
* https://core.telegram.org/bots/api#sendmessage
* Used keys:
* ALERT_STATE, ALERT_URL, ALERT_MESSAGE, DURATION,
* ENTITY_NAME, ENTITY_DESCRIPTION,
* DEVICE_HOSTNAME, DEVICE_UPTIME
*/
{{#ALERT_EMOJI}}{{{ALERT_EMOJI}}} {{/ALERT_EMOJI}}{{ALERT_TIMESTAMP}}
{{ALERT_STATE}} : {{ALERT_MESSAGE}}
{{#ENTITY_NAME}}
Entity: {{ENTITY_NAME}}
{{/ENTITY_NAME}}
{{#ENTITY_DESCRIPTION}}
Description: {{ENTITY_DESCRIPTION}}
{{/ENTITY_DESCRIPTION}}
// For syslog:
{{#SYSLOG_MESSAGE}}
Message: {{SYSLOG_MESSAGE}}
{{/SYSLOG_MESSAGE}}
//Duration: {{DURATION}}
Device: {{DEVICE_HOSTNAME}}{{#DEVICE_DESCRIPTION}} ({{DEVICE_DESCRIPTION}}){{/DEVICE_DESCRIPTION}}
Location: {{DEVICE_LOCATION}}
Device Uptime: {{DEVICE_UPTIME}}
More information: {{ALERT_URL}}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long