⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.23
Server IP:
178.33.27.10
Server:
Linux cpanel.dev-unit.com 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64
Server Software:
Apache/2.4.57 (Unix) OpenSSL/1.0.2k-fips
PHP Version:
8.2.11
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
local
/
src
/
netdata
/
health
/
schema.d
/
View File Name :
health:alert:prototype.json
{ "jsonSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "definitions": { "matchPlugin": { "type": "string", "default": "*", "title": "Plugins", "description": "A simple pattern to match the data collection plugins that are collecting the data this rule is to be applied to. The values it takes are shown as _collect_plugin at the labels filter of the charts on the dashboard." }, "matchModule": { "type": "string", "default": "*", "title": "Modules", "description": "A simple pattern to match the data collection plugin modules that are collecting the data this rule is to be applied to. The values it takes are shown as _collect_module at the labels filter of the charts on the dashboard." }, "matchInstanceLabels": { "type": "string", "default": "*", "title": "Only for instances with these labels", "description": "A simple pattern to match the instance labels of the instances this rule is to be applied to. A space separated list of label=value pairs is accepted. Asterisks can be placed anywhere, including the label key. The label keys and their values are available at the labels filter of the charts on the dashboard." }, "matchHostLabels": { "type": "string", "default": "*", "title": "Only for nodes with these host labels", "description": "A simple pattern to match the node labels of the nodes this rule is to be applied to. A space separated list of label=value pairs is accepted. Asterisks can be placed anywhere, including the label key. The label keys and their values are available at the labels filter of the charts on the dashboard." }, "matchHostnames": { "type": "string", "default": "*", "title": "Only for these hostnames", "description": "A simple pattern to match the hostnames of the nodes this rule is to be applied to." }, "matchOs": { "type": "string", "default": "*", "title": "Operating Systems", "description": "A simple pattern to match the operating system name of the nodes this rule is to be applied to. The operating system names are available at the global nodes filter, with label key _os_name." }, "matchInstance": { "type": "object", "title": "Apply this rule to a single instance", "description": "This rule will be applied to a specific instance on all nodes", "properties": { "on": { "type": "string", "default": "", "title": "The instance this rule should be applied to", "description": "You can find the instance names on all charts at the instances drop down menu. Do not include the host name in this field." }, "instance_labels": { "$ref": "#/definitions/matchInstanceLabels" }, "host_labels": { "$ref": "#/definitions/matchHostLabels" }, "host": { "$ref": "#/definitions/matchHostnames" }, "os": { "$ref": "#/definitions/matchOs" }, "plugin": { "$ref": "#/definitions/matchPlugin" }, "module": { "$ref": "#/definitions/matchModule" } }, "required": [ "on", "os", "host", "plugin", "module", "host_labels", "instance_labels" ] }, "matchTemplate": { "type": "object", "title": "Apply this rule to all instances of a context", "description": "This rule will applied to all instances on all nodes.", "properties": { "on": { "type": "string", "default": "", "title": "The context of the instances this rule should be applied to", "description": "The context is the code-name of each chart on the dashboard, that appears at the chart title bar, between the chart title and its unit of measurement, like: system.cpu, disk.io, etc." }, "instance_labels": { "$ref": "#/definitions/matchInstanceLabels" }, "host_labels": { "$ref": "#/definitions/matchHostLabels" }, "host": { "$ref": "#/definitions/matchHostnames" }, "instances": { "type": "string", "default": "*", "title": "On on these instances", "description": "A simple pattern to match the instance names of the instances this rule is to be applied to." }, "os": { "$ref": "#/definitions/matchOs" }, "plugin": { "$ref": "#/definitions/matchPlugin" }, "module": { "$ref": "#/definitions/matchModule" } }, "required": [ "on", "os", "host", "plugin", "module", "host_labels", "instances", "instance_labels" ] }, "config": { "type": "object", "title": "Alert Configuration", "description": "The properties that control the value the alert will get, the conditions it will trigger, the back-off for notifications, the auto-repeating of notifications, etc.", "properties": { "summary": { "type": "string", "title": "Short description of the alert", "description": "This field is used in notification as a short description of the alert. Variables, like ${label:key}, are replaced with the value of instance label called 'key'." }, "info": { "type": "string", "title": "Long description of the alert", "description": "This field is used to provide enough information about the type and nature of the alert. Variables, like ${label:key}, are replaced with the value of instance label called 'key'." }, "type": { "type": "string", "title": "Alert Type", "description": "Use categories like: 'System', 'Containers', 'Web Servers', 'Message Brokers', etc." }, "component": { "type": "string", "title": "Alert Component", "description": "Component is a sub-type of Alert Type. Examples: 'CPU', 'Memory', 'Network', 'Disk', 'Hardware', 'nginx', 'redis', 'postgresql', etc." }, "classification": { "type": "string", "title": "Classification", "description": "Use 'Workload', 'Utilization', 'Latency', 'Availability', 'Errors', etc." }, "value": { "type": "object", "title": "Alert Value Calculation", "description": "Each alert has a value. This section defines how this value is calculated.", "properties": { "database_lookup": { "type": "object", "title": "Database Query to Get Value", "description": "The database query to be executed to calculate the value of the alert. When set, the query is executed before any other calculations. The result of the query will be available as $this in further calculations.", "properties": { "after": { "type": "integer", "default": 0, "title": "From", "description": "The oldest timestamp of the time-series data to be included in the query. Negative values define a duration in seconds in the past (so, -60 means a minute ago)." }, "before": { "type": "integer", "default": 0, "title": "To", "description": "The newest timestamp of the time-series data to be included in the query. Negative value define a duration in seconds in the past (so, -60 means a minute ago). Zero means now." }, "dimensions": { "type": "string", "title": "Dimensions", "description": "A simple pattern to match the dimensions that should be included in the query", "default": "*" }, "grouping": { "type": "string", "oneOf": [ { "const": "average", "title": "The mean (average) value" }, { "const": "median", "title": "The median value" }, { "const": "min", "title": "The minimum value" }, { "const": "max", "title": "The maximum value" }, { "const": "sum", "title": "The sum of all the values" }, { "const": "incremental_sum", "title": "The delta of the latest and oldest values" }, { "const": "stddev", "title": "The standard deviation of the values" }, { "const": "cv", "title": "The standard deviation expresses as a % of the mean value" }, { "const": "trimmed-mean1", "title": "The mean after trimming 1% of the extreme values" }, { "const": "trimmed-mean2", "title": "The mean after trimming 2% of the extreme values" }, { "const": "trimmed-mean3", "title": "The mean after trimming 3% of the extreme values" }, { "const": "trimmed-mean", "title": "The mean after trimming 5% of the extreme values" }, { "const": "trimmed-mean10", "title": "The mean after trimming 10% of the extreme values" }, { "const": "trimmed-mean15", "title": "The mean after trimming 15% of the extreme values" }, { "const": "trimmed-mean20", "title": "The mean after trimming 20% of the extreme values" }, { "const": "trimmed-mean25", "title": "The mean after trimming 25% of the extreme values" }, { "const": "trimmed-median1", "title": "The median after trimming 1% of the extreme values" }, { "const": "trimmed-median2", "title": "The median after trimming 2% of the extreme values" }, { "const": "trimmed-median3", "title": "The median after trimming 3% of the extreme values" }, { "const": "trimmed-median", "title": "The median after trimming 5% of the extreme values" }, { "const": "trimmed-median10", "title": "The median after trimming 10% of the extreme values" }, { "const": "trimmed-median15", "title": "The median after trimming 15% of the extreme values" }, { "const": "trimmed-median20", "title": "The median after trimming 20% of the extreme values" }, { "const": "trimmed-median25", "title": "The median after trimming 25% of the extreme values" }, { "const": "percentile99", "title": "The 99th percentile of the values" }, { "const": "percentile98", "title": "The 98th percentile of the values" }, { "const": "percentile97", "title": "The 97th percentile of the values" }, { "const": "percentile", "title": "The 95th percentile of the values" }, { "const": "percentile90", "title": "The 90th percentile of the values" }, { "const": "percentile80", "title": "The 80th percentile of the values" }, { "const": "percentile75", "title": "The 75th percentile of the values" }, { "const": "percentile50", "title": "The 50th percentile of the values" }, { "const": "percentile25", "title": "The 25th percentile of the values" }, { "const": "ses", "title": "Single Exponential Smoothing" }, { "const": "des", "title": "Double Exponential Smoothing" }, { "const": "countif", "title": "Count If zero" } ], "default": "average", "title": "Time Aggregation Function", "description": "When querying time-series data we need to come up with a single value. This function is used to aggregate all the values of the time-series data to a single value." }, "options": { "type": "array", "title": "Time-Series Query options", "description": "Options affecting the way the value is calculated", "uniqueItems": true, "items": { "oneOf": [ { "const": "unaligned", "title": "Do not shift the time-frame for visual presentation" }, { "const": "abs", "title": "Make all values positive before using them" }, { "const": "min2max", "title": "Use the delta of the minimum to the maximum value" }, { "const": "null2zero", "title": "Treat gaps in the time-series as a zero value" }, { "const": "percentage", "title": "Calculate the percentage of the selected dimensions over the sum of all dimensions" }, { "const": "anomaly-bit", "title": "Query the anomaly rate of the samples collected" }, { "const": "match_ids", "title": "Match only dimension IDs, not Names" }, { "const": "match_names", "title": "Match only dimension Names, not IDs" } ] }, "default": [ "unaligned" ] } } }, "calculation": { "type": "string", "title": "Calculation to Transform the Value", "description": "The database value is available as '$this'. This expression can utilize variables to transform the value of the alert." }, "units": { "type": "string", "title": "Unit", "description": "The unit of measurement the alert value is expressed with. If unset, the units of the instance the alert is attached to will be used." } } }, "conditions": { "type": "object", "title": "Warning and Critical Conditions", "properties": { "warning_condition": { "type": "string", "title": "Warning Expression", "description": "The alert value is available as '$this'. If this expression evaluates to a non-zero value, the alert is considered to be in warning level." }, "critical_condition": { "type": "string", "title": "Critical Expression", "description": "The alert value is available as '$this'. If this expression evaluates to a non-zero value, the alert is considered to be in critical level." }, "green": { "type": [ "integer", "null" ], "title": "Healthy threshold", "description": "A threshold that indicates a healthy status. This threshold can be used as '$green' in the alert conditions." }, "red": { "type": [ "integer", "null" ], "title": "Critical threshold", "description": "A threshold that indicates a critical status. This threshold can be used as '$red' in the alert conditions." } } }, "action": { "type": "object", "title": "Alert Action (notification or automation)", "description": "The action the alert should take when it transitions states", "properties": { "execute": { "type": "string", "title": "Command to execute when the alert transitions states", "description": "Leave this empty to get the default alert notification" }, "recipient": { "type": "string", "title": "Recipient(s)", "description": "A space separated list of the recipients of the alert notifications. The special recipient 'silent' prevents this alert from taking any action (i.e. sending notifications)." }, "options": { "type": "array", "title": "Action Options", "description": "Options related to the actions this alert will take.", "uniqueItems": true, "items": { "oneOf": [ { "const": "no-clear-notification", "title": "Do not perform any action when the alert is cleared"} ] }, "default": [] }, "delay": { "type": "object", "title": "Delay the action (notification)", "description": "Rules to postpone the action, to avoid multiple notifications on flapping alerts.", "properties": { "up": { "type": "integer", "title": "Delay when raising", "description": "Delay the action (notification) that many seconds, when the alert is rising." }, "down": { "type": "integer", "title": "Delay when going Down", "description": "Delay the action (notification) that many seconds, when the alert is recovering." }, "multiplier": { "type": "number", "title": "Back-Off", "description": "Multiply the delay by this number, every time the alert transitions to a new state, while the action (notification) is being delayed." }, "max": { "type": "integer", "title": "Max", "description": "The maximum acceptable delay in seconds, for taking the action (notification)." } } }, "repeat": { "type": "object", "title": "Auto-Repeat Action", "description": "Repeat the action while the alert is raised.", "properties": { "enabled": { "type": "boolean" }, "warning": { "type": "integer", "title": "Repeat on Warning", "description": "The number of seconds to repeat the action while the alert is in warning state" }, "critical": { "type": "integer", "title": "Repeat on Critical", "description": "The number of seconds to repeat the action while the alert is in critical state" } } } } } }, "required": [ ] } }, "type": "object", "properties": { "name": { "type": "string" }, "format_version": { "type": "integer", "default": 1 }, "rules": { "type": "array", "items": { "type": "object", "properties": { "enabled": { "type": "boolean", "default": true, "title": "Enabled" }, "type": { "type": "string", "oneOf": [ { "const": "instance" , "title": "Apply this rule to a specific instance (deprecated)" }, { "const": "template" , "title": "Apply this rule to all instances" } ], "default": "template", "title": "Type of rule", "description": "Rules can be configured to match a specific instance (like a specific disk), or match all the instances (like all the disks). All rules are always checked against all nodes streamed to this Netdata, so the matching rules include patterns to match both instances and nodes." } }, "required": [ "type", "enabled" ], "if": { "properties": { "type": { "const": "instance" } } }, "then": { "properties": { "match": { "$ref": "#/definitions/matchInstance" }, "config": { "$ref": "#/definitions/config" } } }, "else": { "properties": { "match": { "$ref": "#/definitions/matchTemplate" }, "config": { "$ref": "#/definitions/config" } } } } } }, "required": [ "rules" ] }, "uiSchema": { "format_version": { "ui:widget": "hidden" }, "name": { "ui:widget": "hidden" }, "rules": { "items": { "enabled": { "ui:widget": "checkbox" }, "match": { "ui:classNames": "dyncfg-grid dyncfg-grid-col-6", "on": { "ui:classNames": "dyncfg-grid-col-span-1-6" }, "instance_labels": { "ui:classNames": "dyncfg-grid-col-span-1-2" }, "host_labels": { "ui:classNames": "dyncfg-grid-col-span-3-2" }, "host": { "ui:classNames": "dyncfg-grid-col-span-5-2" }, "instances": { "ui:classNames": "dyncfg-grid-col-span-1-2" } }, "config": { "ui:classNames": "dyncfg-grid dyncfg-grid-col-6", "summary": { "ui:classNames": "dyncfg-grid-col-span-1-3" }, "info": { "ui:classNames": "dyncfg-grid-col-span-4-3" }, "type": { "ui:classNames": "dyncfg-grid-col-span-1-2" }, "component": { "ui:classNames": "dyncfg-grid-col-span-3-2" }, "classification": { "ui:classNames": "dyncfg-grid-col-span-5-2" }, "value": { "ui:classNames": "dyncfg-grid dyncfg-grid-col-6 dyncfg-grid-col-span-1-6", "database_lookup": { "ui:classNames": "dyncfg-grid dyncfg-grid-col-6 dyncfg-grid-col-span-1-6", "after": { "ui:classNames": "dyncfg-grid-col-span-1-1" }, "before": { "ui:classNames": "dyncfg-grid-col-span-2-1" }, "dimensions": { "ui:classNames": "dyncfg-grid-col-span-3-4" }, "grouping": { "ui:classNames": "dyncfg-grid-col-span-1-3" }, "options": { "ui:classNames": "dyncfg-grid-col-span-4-3" } }, "calculation": { "ui:classNames": "dyncfg-grid-col-span-1-5" }, "units": { "ui:classNames": "dyncfg-grid-col-span-6-1" } }, "conditions": { "ui:classNames": "dyncfg-grid dyncfg-grid-col-6 dyncfg-grid-col-span-1-6", "warning_condition": { "ui:classNames": "dyncfg-grid-col-span-1-2" }, "critical_condition": { "ui:classNames": "dyncfg-grid-col-span-3-2" }, "green": { "ui:classNames": "dyncfg-grid-col-span-5-1" }, "red": { "ui:classNames": "dyncfg-grid-col-span-6-1" } }, "action": { "ui:classNames": "dyncfg-grid dyncfg-grid-col-6 dyncfg-grid-col-span-1-6", "execute": { "ui:classNames": "dyncfg-grid-col-span-1-3" }, "recipient": { "ui:classNames": "dyncfg-grid-col-span-4-1" }, "options": { "ui:classNames": "dyncfg-grid-col-span-5-2" }, "delay": { "ui:Collapsible": true, "ui:InitiallyExpanded": false, "ui:classNames": "dyncfg-grid dyncfg-grid-col-6 dyncfg-grid-col-span-1-6", "up": { "ui:classNames": "dyncfg-grid-col-span-1-2" }, "down": { "ui:classNames": "dyncfg-grid-col-span-3-2" }, "multiplier": { "ui:classNames": "dyncfg-grid-col-span-5-1" }, "max": { "ui:classNames": "dyncfg-grid-col-span-6-1" } }, "repeat": { "ui:Collapsible": true, "ui:InitiallyExpanded": false, "ui:classNames": "dyncfg-grid dyncfg-grid-col-6 dyncfg-grid-col-span-1-6", "enabled": { "ui:classNames": "dyncfg-grid-col-span-1-2" }, "warning": { "ui:classNames": "dyncfg-grid-col-span-3-2" }, "critical": { "ui:classNames": "dyncfg-grid-col-span-5-2" } } }, "hash": { "ui:widget": "hidden" }, "source_type": { "ui:widget": "hidden" }, "source": { "ui:widget": "hidden" } } } } }, "uiOptions": { "fullPage": true } }