974 lines
38 KiB
YAML
974 lines
38 KiB
YAML
zabbix_export:
|
|
version: '7.0'
|
|
template_groups:
|
|
- uuid: a571c0d144b14fd4a87a9d9b2aa9fcd6
|
|
name: Templates/Applications
|
|
templates:
|
|
- uuid: aa3286a824464020863ead141e8f0afc
|
|
template: 'Apache by Zabbix agent active'
|
|
name: 'Apache by Zabbix agent active'
|
|
description: |
|
|
Get metrics from mod_status module using HTTP agent.
|
|
https://httpd.apache.org/docs/current/mod/mod_status.html
|
|
|
|
You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback/384764-discussion-thread-for-official-zabbix-template-apache
|
|
|
|
Generated by official Zabbix template tool "Templator"
|
|
vendor:
|
|
name: Zabbix
|
|
version: 7.0-2
|
|
groups:
|
|
- name: Templates/Applications
|
|
items:
|
|
- uuid: 4f77b3a553d446619715e681799ea92c
|
|
name: 'Total bytes'
|
|
type: DEPENDENT
|
|
key: apache.bytes
|
|
delay: '0'
|
|
value_type: FLOAT
|
|
units: B
|
|
description: 'The total bytes served.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- '$["Total kBytes"]'
|
|
- type: MULTIPLIER
|
|
parameters:
|
|
- '1024'
|
|
master_item:
|
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
|
tags:
|
|
- tag: component
|
|
value: network
|
|
- uuid: a15b5f65e81440a49fc5918afd31d73b
|
|
name: 'Bytes per second'
|
|
type: DEPENDENT
|
|
key: apache.bytes.rate
|
|
delay: '0'
|
|
value_type: FLOAT
|
|
units: Bps
|
|
description: |
|
|
It is calculated as a rate of change for total bytes statistics.
|
|
`BytesPerSec` is not used, as it counts the average since the last Apache server start.
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- '$["Total kBytes"]'
|
|
- type: MULTIPLIER
|
|
parameters:
|
|
- '1024'
|
|
- type: CHANGE_PER_SECOND
|
|
parameters:
|
|
- ''
|
|
master_item:
|
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
|
tags:
|
|
- tag: component
|
|
value: network
|
|
- uuid: b0726bf9933a4349854bce2005e66f77
|
|
name: 'Total requests'
|
|
type: DEPENDENT
|
|
key: apache.requests
|
|
delay: '0'
|
|
description: 'The total number of the Apache server accesses.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- '$["Total Accesses"]'
|
|
master_item:
|
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
|
tags:
|
|
- tag: component
|
|
value: network
|
|
- uuid: 864887722e62444a8d8f0756f161fc23
|
|
name: 'Requests per second'
|
|
type: DEPENDENT
|
|
key: apache.requests.rate
|
|
delay: '0'
|
|
value_type: FLOAT
|
|
description: |
|
|
It is calculated as a rate of change for the "Total requests" statistics.
|
|
`ReqPerSec` is not used, as it counts the average since the last Apache server start.
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- '$["Total Accesses"]'
|
|
- type: CHANGE_PER_SECOND
|
|
parameters:
|
|
- ''
|
|
master_item:
|
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
|
tags:
|
|
- tag: component
|
|
value: network
|
|
- uuid: af675fca551a45659f823cdf2e06175c
|
|
name: Uptime
|
|
type: DEPENDENT
|
|
key: apache.uptime
|
|
delay: '0'
|
|
units: uptime
|
|
description: 'The service uptime expressed in seconds.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.ServerUptimeSeconds
|
|
master_item:
|
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
|
tags:
|
|
- tag: component
|
|
value: system
|
|
triggers:
|
|
- uuid: 2f9e1d5e188f4f6190088986f6fc3f70
|
|
expression: 'last(/Apache by Zabbix agent active/apache.uptime)<10m'
|
|
name: 'Apache: Service has been restarted'
|
|
event_name: 'Apache: Service has been restarted (uptime < 10m)'
|
|
priority: INFO
|
|
description: 'Uptime is less than 10 minutes.'
|
|
manual_close: 'YES'
|
|
tags:
|
|
- tag: scope
|
|
value: notice
|
|
- uuid: 67523f1351814d388f95178363a106ff
|
|
name: Version
|
|
type: DEPENDENT
|
|
key: apache.version
|
|
delay: '0'
|
|
value_type: CHAR
|
|
trends: '0'
|
|
description: 'The Apache service version.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.ServerVersion
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 1d
|
|
master_item:
|
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
|
tags:
|
|
- tag: component
|
|
value: system
|
|
triggers:
|
|
- uuid: 80d8c27a060347a4a852c3f6481244c3
|
|
expression: 'last(/Apache by Zabbix agent active/apache.version,#1)<>last(/Apache by Zabbix agent active/apache.version,#2) and length(last(/Apache by Zabbix agent active/apache.version))>0'
|
|
name: 'Apache: Version has changed'
|
|
event_name: 'Apache: Version has changed (new version: {ITEM.VALUE})'
|
|
priority: INFO
|
|
description: 'Apache version has changed. Acknowledge to close the problem manually.'
|
|
manual_close: 'YES'
|
|
tags:
|
|
- tag: scope
|
|
value: notice
|
|
- uuid: 93beadab3d194772ac1a6f1950b20cad
|
|
name: 'Workers idle cleanup'
|
|
type: DEPENDENT
|
|
key: apache.workers.cleanup
|
|
delay: '0'
|
|
description: 'The number of workers in cleanup state.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.Workers.cleanup
|
|
master_item:
|
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
|
tags:
|
|
- tag: component
|
|
value: system
|
|
- uuid: 657a21b70a104778b32805226a05b27a
|
|
name: 'Workers closing connection'
|
|
type: DEPENDENT
|
|
key: apache.workers.closing
|
|
delay: '0'
|
|
description: 'The number of workers in closing state.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.Workers.closing
|
|
master_item:
|
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
|
tags:
|
|
- tag: component
|
|
value: system
|
|
- uuid: 86afd9d804f146b1adeed8844223d38b
|
|
name: 'Workers DNS lookup'
|
|
type: DEPENDENT
|
|
key: apache.workers.dnslookup
|
|
delay: '0'
|
|
description: 'The number of workers in `dnslookup` state.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.Workers.dnslookup
|
|
master_item:
|
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
|
tags:
|
|
- tag: component
|
|
value: system
|
|
- uuid: 70565d82384a439587ff6a32fa09ee1e
|
|
name: 'Workers finishing'
|
|
type: DEPENDENT
|
|
key: apache.workers.finishing
|
|
delay: '0'
|
|
description: 'The number of workers in finishing state.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.Workers.finishing
|
|
master_item:
|
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
|
tags:
|
|
- tag: component
|
|
value: system
|
|
- uuid: 7a2c9e6039b942c09ff30d8ff77b9658
|
|
name: 'Workers keepalive (read)'
|
|
type: DEPENDENT
|
|
key: apache.workers.keepalive
|
|
delay: '0'
|
|
description: 'The number of workers in `keepalive` state.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.Workers.keepalive
|
|
master_item:
|
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
|
tags:
|
|
- tag: component
|
|
value: system
|
|
- uuid: 0c3f9385fcc047d6ae8ee523f7bebb79
|
|
name: 'Workers logging'
|
|
type: DEPENDENT
|
|
key: apache.workers.logging
|
|
delay: '0'
|
|
description: 'The number of workers in logging state.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.Workers.logging
|
|
master_item:
|
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
|
tags:
|
|
- tag: component
|
|
value: system
|
|
- uuid: 7a4580dcfd974c7f9d59b8703054e77f
|
|
name: 'Workers reading request'
|
|
type: DEPENDENT
|
|
key: apache.workers.reading
|
|
delay: '0'
|
|
description: 'The number of workers in reading state.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.Workers.reading
|
|
master_item:
|
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
|
tags:
|
|
- tag: component
|
|
value: system
|
|
- uuid: 63d775979b934e72a2ed474419cf5c03
|
|
name: 'Workers sending reply'
|
|
type: DEPENDENT
|
|
key: apache.workers.sending
|
|
delay: '0'
|
|
description: 'The number of workers in sending state.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.Workers.sending
|
|
master_item:
|
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
|
tags:
|
|
- tag: component
|
|
value: system
|
|
- uuid: 8acd6c143a074c6faa46aa64869afc9b
|
|
name: 'Workers slot with no current process'
|
|
type: DEPENDENT
|
|
key: apache.workers.slot
|
|
delay: '0'
|
|
description: 'The number of slots with no current process.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.Workers.slot
|
|
master_item:
|
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
|
tags:
|
|
- tag: component
|
|
value: system
|
|
- uuid: 86200cce3b7d47798cc35bab713f87aa
|
|
name: 'Workers starting up'
|
|
type: DEPENDENT
|
|
key: apache.workers.starting
|
|
delay: '0'
|
|
description: 'The number of workers in starting state.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.Workers.starting
|
|
master_item:
|
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
|
tags:
|
|
- tag: component
|
|
value: system
|
|
- uuid: 64b26283b39946fe92d729ac00afeca0
|
|
name: 'Workers waiting for connection'
|
|
type: DEPENDENT
|
|
key: apache.workers.waiting
|
|
delay: '0'
|
|
description: 'The number of workers in waiting state.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.Workers.waiting
|
|
master_item:
|
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
|
tags:
|
|
- tag: component
|
|
value: system
|
|
- uuid: 90757d625da543b18e136da7a0099be6
|
|
name: 'Total workers busy'
|
|
type: DEPENDENT
|
|
key: apache.workers_total.busy
|
|
delay: '0'
|
|
description: 'The total number of busy worker threads/processes.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.BusyWorkers
|
|
master_item:
|
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
|
tags:
|
|
- tag: component
|
|
value: system
|
|
- uuid: 87be88163d4940658400ddf762faaeb6
|
|
name: 'Total workers idle'
|
|
type: DEPENDENT
|
|
key: apache.workers_total.idle
|
|
delay: '0'
|
|
description: 'The total number of idle worker threads/processes.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.IdleWorkers
|
|
master_item:
|
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
|
tags:
|
|
- tag: component
|
|
value: system
|
|
- uuid: 3ac09d338f0847288eda20732bf5aa10
|
|
name: 'Service response time'
|
|
type: ZABBIX_ACTIVE
|
|
key: 'net.tcp.service.perf[http,"{$APACHE.STATUS.HOST}","{$APACHE.STATUS.PORT}"]'
|
|
value_type: FLOAT
|
|
units: s
|
|
tags:
|
|
- tag: component
|
|
value: application
|
|
- tag: component
|
|
value: health
|
|
- uuid: e4252071d0864fd5bf7c60c4d6e4915d
|
|
name: 'Service ping'
|
|
type: ZABBIX_ACTIVE
|
|
key: 'net.tcp.service[http,"{$APACHE.STATUS.HOST}","{$APACHE.STATUS.PORT}"]'
|
|
valuemap:
|
|
name: 'Service state'
|
|
preprocessing:
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 10m
|
|
tags:
|
|
- tag: component
|
|
value: application
|
|
- tag: component
|
|
value: health
|
|
- uuid: 37f15f5a28364399aa66aad31d0acc08
|
|
name: 'Get processes summary'
|
|
type: ZABBIX_ACTIVE
|
|
key: 'proc.get[{$APACHE.PROCESS.NAME.PARAMETER},,,summary]'
|
|
history: '0'
|
|
value_type: TEXT
|
|
trends: '0'
|
|
description: 'The aggregated data of summary metrics for all processes.'
|
|
tags:
|
|
- tag: component
|
|
value: raw
|
|
- uuid: d103e519e5044dfd982d535a0981bc84
|
|
name: 'Get status'
|
|
type: ZABBIX_ACTIVE
|
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
|
history: 1h
|
|
value_type: TEXT
|
|
trends: '0'
|
|
description: |
|
|
Getting data from a machine-readable version of the Apache status page.
|
|
For more information see Apache Module [mod_status](https://httpd.apache.org/docs/current/mod/mod_status.html).
|
|
preprocessing:
|
|
- type: JAVASCRIPT
|
|
parameters:
|
|
- |
|
|
var lines = value.split('\n');
|
|
var output = {},
|
|
workers = {
|
|
'_': 0, 'S': 0, 'R': 0, 'W': 0,
|
|
'K': 0, 'D': 0, 'C': 0, 'L': 0,
|
|
'G': 0, 'I': 0, '.': 0
|
|
};
|
|
|
|
for (var i = 0; i < lines.length; i++) {
|
|
var line = lines[i].match(/([A-z0-9 ]+): (.*)/);
|
|
|
|
if (line !== null) {
|
|
output[line[1]] = isNaN(line[2]) ? line[2] : Number(line[2]);
|
|
}
|
|
}
|
|
|
|
output.ServerUptimeSeconds = output.ServerUptimeSeconds || output.Uptime;
|
|
output.ServerVersion = output.ServerVersion || output.Server;
|
|
|
|
if (typeof output.Scoreboard === 'string') {
|
|
for (var i = 0; i < output.Scoreboard.length; i++) {
|
|
var char = output.Scoreboard[i];
|
|
|
|
workers[char]++;
|
|
}
|
|
}
|
|
|
|
output.Workers = {
|
|
waiting: workers['_'], starting: workers['S'], reading: workers['R'],
|
|
sending: workers['W'], keepalive: workers['K'], dnslookup: workers['D'],
|
|
closing: workers['C'], logging: workers['L'], finishing: workers['G'],
|
|
cleanup: workers['I'], slot: workers['.']
|
|
};
|
|
|
|
return JSON.stringify(output);
|
|
tags:
|
|
- tag: component
|
|
value: raw
|
|
discovery_rules:
|
|
- uuid: 973011cd85cb4ef58d25bc5e0a1118b6
|
|
name: 'Event MPM discovery'
|
|
type: DEPENDENT
|
|
key: apache.mpm.event.discovery
|
|
delay: '0'
|
|
description: |
|
|
The discovery of additional metrics if the event Multi-Processing Module (MPM) is used.
|
|
For more details see [Apache MPM event](https://httpd.apache.org/docs/current/mod/event.html).
|
|
item_prototypes:
|
|
- uuid: a640f7cba9314dd595d609ef79286548
|
|
name: 'Bytes per request'
|
|
type: DEPENDENT
|
|
key: 'apache.bytes[per_request{#SINGLETON}]'
|
|
delay: '0'
|
|
value_type: FLOAT
|
|
units: B
|
|
description: 'The average number of client requests per second.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.BytesPerReq
|
|
master_item:
|
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
|
tags:
|
|
- tag: component
|
|
value: connection
|
|
- uuid: 3f1daaa5642545f1bdd5ab9b50ec49c9
|
|
name: 'Connections async closing'
|
|
type: DEPENDENT
|
|
key: 'apache.connections[async_closing{#SINGLETON}]'
|
|
delay: '0'
|
|
description: 'The number of asynchronous connections in closing state (applicable only to the event MPM).'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.ConnsAsyncClosing
|
|
master_item:
|
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
|
tags:
|
|
- tag: component
|
|
value: connection
|
|
- uuid: 0beb4c6e7915408691264f8aa8073d67
|
|
name: 'Connections async keepalive'
|
|
type: DEPENDENT
|
|
key: 'apache.connections[async_keep_alive{#SINGLETON}]'
|
|
delay: '0'
|
|
description: 'The number of asynchronous connections in keepalive state (applicable only to the event MPM).'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.ConnsAsyncKeepAlive
|
|
master_item:
|
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
|
tags:
|
|
- tag: component
|
|
value: connection
|
|
- uuid: da590c6635484f178d4d26de5863f00e
|
|
name: 'Connections async writing'
|
|
type: DEPENDENT
|
|
key: 'apache.connections[async_writing{#SINGLETON}]'
|
|
delay: '0'
|
|
description: 'The number of asynchronous connections in writing state (applicable only to the event MPM).'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.ConnsAsyncWriting
|
|
master_item:
|
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
|
tags:
|
|
- tag: component
|
|
value: connection
|
|
- uuid: c11f36a9483444e38cecb5e7ae667735
|
|
name: 'Connections total'
|
|
type: DEPENDENT
|
|
key: 'apache.connections[total{#SINGLETON}]'
|
|
delay: '0'
|
|
description: 'The number of total connections.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.ConnsTotal
|
|
master_item:
|
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
|
tags:
|
|
- tag: component
|
|
value: connection
|
|
- uuid: ca00fe11b10140f6ad791c8fcc012082
|
|
name: 'Number of async processes'
|
|
type: DEPENDENT
|
|
key: 'apache.process[num{#SINGLETON}]'
|
|
delay: '0'
|
|
description: 'The number of asynchronous processes.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.Processes
|
|
master_item:
|
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
|
tags:
|
|
- tag: component
|
|
value: system
|
|
graph_prototypes:
|
|
- uuid: 43fb144dfa5b47afbdd146231e185c13
|
|
name: 'Apache: Current async connections{#SINGLETON}'
|
|
graph_items:
|
|
- color: 199C0D
|
|
item:
|
|
host: 'Apache by Zabbix agent active'
|
|
key: 'apache.connections[async_closing{#SINGLETON}]'
|
|
- sortorder: '1'
|
|
color: F63100
|
|
item:
|
|
host: 'Apache by Zabbix agent active'
|
|
key: 'apache.connections[async_keep_alive{#SINGLETON}]'
|
|
- sortorder: '2'
|
|
color: 00611C
|
|
item:
|
|
host: 'Apache by Zabbix agent active'
|
|
key: 'apache.connections[async_writing{#SINGLETON}]'
|
|
- sortorder: '3'
|
|
drawtype: BOLD_LINE
|
|
color: F7941D
|
|
item:
|
|
host: 'Apache by Zabbix agent active'
|
|
key: 'apache.connections[total{#SINGLETON}]'
|
|
- uuid: 1ab50e84f1d94ea98bb7e5c9d0cf159c
|
|
name: 'Apache: Current async processes{#SINGLETON}'
|
|
graph_items:
|
|
- drawtype: GRADIENT_LINE
|
|
color: 199C0D
|
|
item:
|
|
host: 'Apache by Zabbix agent active'
|
|
key: 'apache.process[num{#SINGLETON}]'
|
|
master_item:
|
|
key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
|
|
preprocessing:
|
|
- type: JAVASCRIPT
|
|
parameters:
|
|
- |
|
|
return JSON.stringify(JSON.parse(value).ServerMPM === 'event'
|
|
? [{'{#SINGLETON}': ''}] : []);
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 3h
|
|
- uuid: 7c4b0d02427b4cf199817b5d5ae66378
|
|
name: 'Apache process discovery'
|
|
type: DEPENDENT
|
|
key: apache.proc.discovery
|
|
delay: '0'
|
|
filter:
|
|
evaltype: AND
|
|
conditions:
|
|
- macro: '{#APACHE.NAME}'
|
|
value: '{$APACHE.PROCESS_NAME}'
|
|
formulaid: A
|
|
description: 'The discovery of the Apache process summary.'
|
|
item_prototypes:
|
|
- uuid: 68c53fcf8d8545ac98e923c04945aec4
|
|
name: 'Get process data'
|
|
type: DEPENDENT
|
|
key: 'apache.proc.get[{#APACHE.NAME}]'
|
|
delay: '0'
|
|
history: '0'
|
|
value_type: TEXT
|
|
trends: '0'
|
|
description: 'The summary metrics aggregated by a process {#APACHE.NAME}.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- '$.[?(@["name"]=="{#APACHE.NAME}")].first()'
|
|
error_handler: CUSTOM_VALUE
|
|
error_handler_params: 'Failed to retrieve process {#APACHE.NAME} data'
|
|
master_item:
|
|
key: 'proc.get[{$APACHE.PROCESS.NAME.PARAMETER},,,summary]'
|
|
tags:
|
|
- tag: component
|
|
value: raw
|
|
- uuid: 5f29e764f0024047bd955388b6585442
|
|
name: 'Number of running processes'
|
|
type: DEPENDENT
|
|
key: 'apache.proc.num[{#APACHE.NAME}]'
|
|
delay: '0'
|
|
description: 'The number of running processes {#APACHE.NAME}.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.processes
|
|
error_handler: CUSTOM_VALUE
|
|
error_handler_params: '0'
|
|
- type: DISCARD_UNCHANGED_HEARTBEAT
|
|
parameters:
|
|
- 1h
|
|
master_item:
|
|
key: 'apache.proc.get[{#APACHE.NAME}]'
|
|
tags:
|
|
- tag: component
|
|
value: system
|
|
trigger_prototypes:
|
|
- uuid: 653a0f021ece4993aaaef441172366b3
|
|
expression: 'last(/Apache by Zabbix agent active/apache.proc.num[{#APACHE.NAME}])=0'
|
|
name: 'Apache: Process is not running'
|
|
priority: HIGH
|
|
tags:
|
|
- tag: scope
|
|
value: availability
|
|
- uuid: 77f232c075384a11a3aefd31a55c0113
|
|
name: 'Memory usage, %'
|
|
type: DEPENDENT
|
|
key: 'apache.proc.pmem[{#APACHE.NAME}]'
|
|
delay: '0'
|
|
value_type: FLOAT
|
|
units: '%'
|
|
description: 'The percentage of real memory used by a process {#APACHE.NAME}.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.pmem
|
|
error_handler: DISCARD_VALUE
|
|
- type: IN_RANGE
|
|
parameters:
|
|
- '0'
|
|
- ''
|
|
error_handler: DISCARD_VALUE
|
|
master_item:
|
|
key: 'apache.proc.get[{#APACHE.NAME}]'
|
|
tags:
|
|
- tag: component
|
|
value: memory
|
|
- uuid: 0ded808ba0b34d03865a288dd9bb0672
|
|
name: 'Memory usage (rss)'
|
|
type: DEPENDENT
|
|
key: 'apache.proc.rss[{#APACHE.NAME}]'
|
|
delay: '0'
|
|
units: B
|
|
description: 'The summary of resident set size memory used by a process {#APACHE.NAME} expressed in bytes.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.rss
|
|
error_handler: DISCARD_VALUE
|
|
- type: IN_RANGE
|
|
parameters:
|
|
- '0'
|
|
- ''
|
|
error_handler: DISCARD_VALUE
|
|
master_item:
|
|
key: 'apache.proc.get[{#APACHE.NAME}]'
|
|
tags:
|
|
- tag: component
|
|
value: memory
|
|
- uuid: ba4d0197f2cb484597175ffd8f693dce
|
|
name: 'Memory usage (vsize)'
|
|
type: DEPENDENT
|
|
key: 'apache.proc.vmem[{#APACHE.NAME}]'
|
|
delay: '0'
|
|
units: B
|
|
description: 'The summary of virtual memory used by a process {#APACHE.NAME} expressed in bytes.'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- $.vsize
|
|
error_handler: DISCARD_VALUE
|
|
- type: IN_RANGE
|
|
parameters:
|
|
- '0'
|
|
- ''
|
|
error_handler: DISCARD_VALUE
|
|
master_item:
|
|
key: 'apache.proc.get[{#APACHE.NAME}]'
|
|
tags:
|
|
- tag: component
|
|
value: memory
|
|
- uuid: b1e48077179f4e439e2d3c3b918c9a03
|
|
name: 'CPU utilization'
|
|
type: ZABBIX_ACTIVE
|
|
key: 'proc.cpu.util[{#APACHE.NAME}]'
|
|
value_type: FLOAT
|
|
units: '%'
|
|
description: 'The percentage of the CPU utilization by a process {#APACHE.NAME}.'
|
|
tags:
|
|
- tag: component
|
|
value: cpu
|
|
trigger_prototypes:
|
|
- uuid: c848c1449cef42bd90af13e6767bd2c9
|
|
expression: 'nodata(/Apache by Zabbix agent active/web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"],30m)=1 and last(/Apache by Zabbix agent active/apache.proc.num[{#APACHE.NAME}])>0'
|
|
name: 'Apache: Failed to fetch status page'
|
|
event_name: 'Apache: Failed to fetch status page (or no data for 30m)'
|
|
priority: WARNING
|
|
description: 'Zabbix has not received any data for items for the last 30 minutes.'
|
|
manual_close: 'YES'
|
|
dependencies:
|
|
- name: 'Apache: Service is down'
|
|
expression: 'last(/Apache by Zabbix agent active/net.tcp.service[http,"{$APACHE.STATUS.HOST}","{$APACHE.STATUS.PORT}"])=0 and last(/Apache by Zabbix agent active/apache.proc.num[{#APACHE.NAME}])>0'
|
|
tags:
|
|
- tag: scope
|
|
value: availability
|
|
- uuid: 4b460b835cb14513b5aace3275827c79
|
|
expression: 'last(/Apache by Zabbix agent active/net.tcp.service[http,"{$APACHE.STATUS.HOST}","{$APACHE.STATUS.PORT}"])=0 and last(/Apache by Zabbix agent active/apache.proc.num[{#APACHE.NAME}])>0'
|
|
name: 'Apache: Service is down'
|
|
priority: AVERAGE
|
|
manual_close: 'YES'
|
|
tags:
|
|
- tag: scope
|
|
value: availability
|
|
- uuid: 93157365ee90446fa8191dfc5d623874
|
|
expression: 'min(/Apache by Zabbix agent active/net.tcp.service.perf[http,"{$APACHE.STATUS.HOST}","{$APACHE.STATUS.PORT}"],5m)>{$APACHE.RESPONSE_TIME.MAX.WARN} and last(/Apache by Zabbix agent active/apache.proc.num[{#APACHE.NAME}])>0'
|
|
name: 'Apache: Service response time is too high'
|
|
event_name: 'Apache: Service response time is too high (over {$APACHE.RESPONSE_TIME.MAX.WARN}s for 5m)'
|
|
priority: WARNING
|
|
manual_close: 'YES'
|
|
dependencies:
|
|
- name: 'Apache: Service is down'
|
|
expression: 'last(/Apache by Zabbix agent active/net.tcp.service[http,"{$APACHE.STATUS.HOST}","{$APACHE.STATUS.PORT}"])=0 and last(/Apache by Zabbix agent active/apache.proc.num[{#APACHE.NAME}])>0'
|
|
tags:
|
|
- tag: scope
|
|
value: performance
|
|
graph_prototypes:
|
|
- uuid: 5427aef4eaad4519b193b38cdc71fde1
|
|
name: 'Apache: Memory usage[{#APACHE.NAME}]'
|
|
graph_items:
|
|
- drawtype: BOLD_LINE
|
|
color: 199C0D
|
|
item:
|
|
host: 'Apache by Zabbix agent active'
|
|
key: 'apache.proc.vmem[{#APACHE.NAME}]'
|
|
- sortorder: '1'
|
|
drawtype: BOLD_LINE
|
|
color: F63100
|
|
item:
|
|
host: 'Apache by Zabbix agent active'
|
|
key: 'apache.proc.rss[{#APACHE.NAME}]'
|
|
master_item:
|
|
key: 'proc.get[{$APACHE.PROCESS.NAME.PARAMETER},,,summary]'
|
|
lld_macro_paths:
|
|
- lld_macro: '{#APACHE.NAME}'
|
|
path: $.name
|
|
tags:
|
|
- tag: class
|
|
value: software
|
|
- tag: target
|
|
value: apache
|
|
macros:
|
|
- macro: '{$APACHE.PROCESS.NAME.PARAMETER}'
|
|
description: 'The process name of the Apache web server used in the item key `proc.get`. It could be specified if the correct process name is known.'
|
|
- macro: '{$APACHE.PROCESS_NAME}'
|
|
value: (httpd|apache2)
|
|
description: 'The process name filter for the Apache process discovery.'
|
|
- macro: '{$APACHE.RESPONSE_TIME.MAX.WARN}'
|
|
value: '10'
|
|
description: 'The maximum Apache response time expressed in seconds for a trigger expression.'
|
|
- macro: '{$APACHE.STATUS.HOST}'
|
|
value: 127.0.0.1
|
|
description: 'The hostname or IP address of the Apache status page.'
|
|
- macro: '{$APACHE.STATUS.PATH}'
|
|
value: 'server-status?auto'
|
|
description: 'The URL path.'
|
|
- macro: '{$APACHE.STATUS.PORT}'
|
|
value: '80'
|
|
description: 'The port of the Apache status page.'
|
|
- macro: '{$APACHE.STATUS.SCHEME}'
|
|
value: http
|
|
description: 'The request scheme, which may be either HTTP or HTTPS.'
|
|
dashboards:
|
|
- uuid: dd69695bb88241e6b457d06da37967fc
|
|
name: 'Apache performance'
|
|
pages:
|
|
- name: General
|
|
widgets:
|
|
- type: graph
|
|
width: '72'
|
|
height: '7'
|
|
fields:
|
|
- type: GRAPH
|
|
name: graphid.0
|
|
value:
|
|
host: 'Apache by Zabbix agent active'
|
|
name: 'Apache: Worker states'
|
|
- type: STRING
|
|
name: reference
|
|
value: AAAAA
|
|
- type: graph
|
|
'y': '7'
|
|
width: '36'
|
|
height: '5'
|
|
fields:
|
|
- type: GRAPH
|
|
name: graphid.0
|
|
value:
|
|
host: 'Apache by Zabbix agent active'
|
|
name: 'Apache: Requests per second'
|
|
- type: STRING
|
|
name: reference
|
|
value: AAAAB
|
|
- type: graphprototype
|
|
'y': '12'
|
|
width: '36'
|
|
height: '5'
|
|
fields:
|
|
- type: INTEGER
|
|
name: columns
|
|
value: '1'
|
|
- type: GRAPH_PROTOTYPE
|
|
name: graphid.0
|
|
value:
|
|
host: 'Apache by Zabbix agent active'
|
|
name: 'Apache: Current async connections{#SINGLETON}'
|
|
- type: STRING
|
|
name: reference
|
|
value: AAAAD
|
|
- type: graph
|
|
x: '36'
|
|
'y': '7'
|
|
width: '36'
|
|
height: '5'
|
|
fields:
|
|
- type: GRAPH
|
|
name: graphid.0
|
|
value:
|
|
host: 'Apache by Zabbix agent active'
|
|
name: 'Apache: Workers total'
|
|
- type: STRING
|
|
name: reference
|
|
value: AAAAC
|
|
- type: graphprototype
|
|
x: '36'
|
|
'y': '12'
|
|
width: '36'
|
|
height: '5'
|
|
fields:
|
|
- type: INTEGER
|
|
name: columns
|
|
value: '1'
|
|
- type: GRAPH_PROTOTYPE
|
|
name: graphid.0
|
|
value:
|
|
host: 'Apache by Zabbix agent active'
|
|
name: 'Apache: Current async processes{#SINGLETON}'
|
|
- type: STRING
|
|
name: reference
|
|
value: AAAAE
|
|
valuemaps:
|
|
- uuid: 872ac3dadab34de9a69acd71d68cd7ea
|
|
name: 'Service state'
|
|
mappings:
|
|
- value: '0'
|
|
newvalue: Down
|
|
- value: '1'
|
|
newvalue: Up
|
|
graphs:
|
|
- uuid: 3461ebdbfb024405a8e8da6c3e970d0d
|
|
name: 'Apache: Requests per second'
|
|
graph_items:
|
|
- drawtype: GRADIENT_LINE
|
|
color: 199C0D
|
|
item:
|
|
host: 'Apache by Zabbix agent active'
|
|
key: apache.requests.rate
|
|
- uuid: 0183d7d9c05843b19db5b4ba94f99350
|
|
name: 'Apache: Worker states'
|
|
graph_items:
|
|
- color: 199C0D
|
|
item:
|
|
host: 'Apache by Zabbix agent active'
|
|
key: apache.workers.dnslookup
|
|
- sortorder: '1'
|
|
color: F63100
|
|
item:
|
|
host: 'Apache by Zabbix agent active'
|
|
key: apache.workers.cleanup
|
|
- sortorder: '2'
|
|
color: 00611C
|
|
item:
|
|
host: 'Apache by Zabbix agent active'
|
|
key: apache.workers.logging
|
|
- sortorder: '3'
|
|
color: F7941D
|
|
item:
|
|
host: 'Apache by Zabbix agent active'
|
|
key: apache.workers.reading
|
|
- sortorder: '4'
|
|
color: FC6EA3
|
|
item:
|
|
host: 'Apache by Zabbix agent active'
|
|
key: apache.workers.sending
|
|
- sortorder: '5'
|
|
color: 6C59DC
|
|
item:
|
|
host: 'Apache by Zabbix agent active'
|
|
key: apache.workers.starting
|
|
- sortorder: '6'
|
|
color: C7A72D
|
|
item:
|
|
host: 'Apache by Zabbix agent active'
|
|
key: apache.workers.closing
|
|
- sortorder: '7'
|
|
color: BA2A5D
|
|
item:
|
|
host: 'Apache by Zabbix agent active'
|
|
key: apache.workers.finishing
|
|
- sortorder: '8'
|
|
color: F230E0
|
|
item:
|
|
host: 'Apache by Zabbix agent active'
|
|
key: apache.workers.keepalive
|
|
- sortorder: '9'
|
|
color: 5CCD18
|
|
item:
|
|
host: 'Apache by Zabbix agent active'
|
|
key: apache.workers.slot
|
|
- sortorder: '10'
|
|
color: BB2A02
|
|
item:
|
|
host: 'Apache by Zabbix agent active'
|
|
key: apache.workers.waiting
|
|
- uuid: c82c849b07564ca29e58df3b984c1da9
|
|
name: 'Apache: Workers total'
|
|
type: STACKED
|
|
graph_items:
|
|
- color: 199C0D
|
|
item:
|
|
host: 'Apache by Zabbix agent active'
|
|
key: apache.workers_total.busy
|
|
- sortorder: '1'
|
|
color: F63100
|
|
item:
|
|
host: 'Apache by Zabbix agent active'
|
|
key: apache.workers_total.idle
|