├── requirements.txt ├── .env.example ├── grafana ├── datasources │ └── Prometheus.json ├── setup.sh └── dashboards │ ├── nginx_container.json │ ├── docker_containers.json │ ├── monitor_services.json │ └── docker_host.json ├── Dockerfile ├── prometheus ├── alert.rules └── prometheus.yml ├── alertmanager └── config.yml ├── README.md ├── docker-compose.override.yml.example ├── .gitignore ├── docker-compose.yml ├── main.py ├── examples └── asterisk13.events └── LICENSE /requirements.txt: -------------------------------------------------------------------------------- 1 | panoramisk 2 | statsd-tags 3 | -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | AMI_HOST=localhost 2 | AMI_PORT=5038 3 | AMI_USER=stats 4 | AMI_SECRET=secret 5 | -------------------------------------------------------------------------------- /grafana/datasources/Prometheus.json: -------------------------------------------------------------------------------- 1 | { 2 | "name":"Prometheus", 3 | "type":"prometheus", 4 | "url":"http://prometheus:9090", 5 | "access":"proxy", 6 | "basicAuth":false 7 | } -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3-alpine 2 | 3 | WORKDIR /app 4 | 5 | COPY ./requirements.txt . 6 | RUN pip3 install -r requirements.txt 7 | 8 | COPY ./main.py . 9 | 10 | CMD ["python3", "main.py"] 11 | -------------------------------------------------------------------------------- /prometheus/alert.rules: -------------------------------------------------------------------------------- 1 | groups: 2 | - name: targets 3 | rules: 4 | - alert: monitor_service_down 5 | expr: up == 0 6 | for: 30s 7 | labels: 8 | severity: critical 9 | annotations: 10 | summary: "Monitor service non-operational" 11 | description: "Service {{ $labels.instance }} is down." 12 | -------------------------------------------------------------------------------- /alertmanager/config.yml: -------------------------------------------------------------------------------- 1 | route: 2 | receiver: 'slack' 3 | 4 | receivers: 5 | - name: 'slack' 6 | slack_configs: 7 | - send_resolved: true 8 | text: "{{ .CommonAnnotations.description }}" 9 | username: 'Prometheus' 10 | channel: '#' 11 | api_url: 'https://hooks.slack.com/services/' 12 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Asterisk Stats 2 | Asterisk Metrics Exporter to StatsD 3 | Rquirements: 4 | * Prometheus 5 | * StatsD exporter - https://github.com/prometheus/statsd_exporter 6 | 7 | ## Running in docker 8 | Set variables to connect to Asterisk in .env file (see .env.example): 9 | * AMI_USER 10 | * AMI_SECRET 11 | * AMI_HOST 12 | * AMI_PORT 13 | ``` 14 | docker-compose up 15 | ``` 16 | -------------------------------------------------------------------------------- /docker-compose.override.yml.example: -------------------------------------------------------------------------------- 1 | version: '3' 2 | services: 3 | prometheus: 4 | ports: 5 | - 49090:9090 6 | 7 | alertmanager: 8 | ports: 9 | - 127.0.0.1:49093:9093 10 | 11 | statsd_exporter: 12 | ports: 13 | - 127.0.0.1:49102:9102 14 | 15 | as: 16 | volumes: 17 | - ./main.py:/app/main.py 18 | 19 | grafana: 20 | ports: 21 | - 3000:3000 22 | -------------------------------------------------------------------------------- /prometheus/prometheus.yml: -------------------------------------------------------------------------------- 1 | global: 2 | scrape_interval: 15s 3 | evaluation_interval: 15s 4 | 5 | # Attach these labels to any time series or alerts when communicating with 6 | # external systems (federation, remote storage, Alertmanager). 7 | external_labels: 8 | monitor: 'docker-host-alpha' 9 | 10 | # Load and evaluate rules in this file every 'evaluation_interval' seconds. 11 | rule_files: 12 | - "alert.rules" 13 | 14 | # A scrape configuration containing exactly one endpoint to scrape. 15 | scrape_configs: 16 | - job_name: 'prometheus' 17 | scrape_interval: 10s 18 | static_configs: 19 | - targets: ['localhost:9090'] 20 | 21 | - job_name: 'statsd_exporter' 22 | scrape_interval: 10s 23 | static_configs: 24 | - targets: ['statsd_exporter:9102'] 25 | 26 | alerting: 27 | alertmanagers: 28 | - scheme: http 29 | static_configs: 30 | - targets: 31 | - 'alertmanager:9093' 32 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | env/ 12 | build/ 13 | develop-eggs/ 14 | dist/ 15 | downloads/ 16 | eggs/ 17 | .eggs/ 18 | lib/ 19 | lib64/ 20 | parts/ 21 | sdist/ 22 | var/ 23 | wheels/ 24 | *.egg-info/ 25 | .installed.cfg 26 | *.egg 27 | 28 | # PyInstaller 29 | # Usually these files are written by a python script from a template 30 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 31 | *.manifest 32 | *.spec 33 | 34 | # Installer logs 35 | pip-log.txt 36 | pip-delete-this-directory.txt 37 | 38 | # Unit test / coverage reports 39 | htmlcov/ 40 | .tox/ 41 | .coverage 42 | .coverage.* 43 | .cache 44 | nosetests.xml 45 | coverage.xml 46 | *.cover 47 | .hypothesis/ 48 | 49 | # Translations 50 | *.mo 51 | *.pot 52 | 53 | # Django stuff: 54 | *.log 55 | local_settings.py 56 | 57 | # Flask stuff: 58 | instance/ 59 | .webassets-cache 60 | 61 | # Scrapy stuff: 62 | .scrapy 63 | 64 | # Sphinx documentation 65 | docs/_build/ 66 | 67 | # PyBuilder 68 | target/ 69 | 70 | # Jupyter Notebook 71 | .ipynb_checkpoints 72 | 73 | # pyenv 74 | .python-version 75 | 76 | # celery beat schedule file 77 | celerybeat-schedule 78 | 79 | # SageMath parsed files 80 | *.sage.py 81 | 82 | # dotenv 83 | .env 84 | 85 | # virtualenv 86 | .venv 87 | venv/ 88 | ENV/ 89 | 90 | # Spyder project settings 91 | .spyderproject 92 | .spyproject 93 | 94 | # Rope project settings 95 | .ropeproject 96 | 97 | # mkdocs documentation 98 | /site 99 | 100 | # mypy 101 | .mypy_cache/ 102 | 103 | # Temporary files 104 | .*.swp 105 | -------------------------------------------------------------------------------- /grafana/setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Taken from https://github.com/grafana/grafana-docker/issues/74 4 | 5 | # Script to configure grafana datasources and dashboards. 6 | # Intended to be run before grafana entrypoint... 7 | # Image: grafana/grafana:4.1.2 8 | # ENTRYPOINT [\"/run.sh\"]" 9 | 10 | GRAFANA_URL=${GRAFANA_URL:-http://$GF_SECURITY_ADMIN_USER:$GF_SECURITY_ADMIN_PASSWORD@localhost:3000} 11 | #GRAFANA_URL=http://grafana-plain.k8s.playground1.aws.ad.zopa.com 12 | DATASOURCES_PATH=${DATASOURCES_PATH:-/etc/grafana/datasources} 13 | DASHBOARDS_PATH=${DASHBOARDS_PATH:-/etc/grafana/dashboards} 14 | 15 | # Generic function to call the Vault API 16 | grafana_api() { 17 | local verb=$1 18 | local url=$2 19 | local params=$3 20 | local bodyfile=$4 21 | local response 22 | local cmd 23 | 24 | cmd="curl -L -s --fail -H \"Accept: application/json\" -H \"Content-Type: application/json\" -X ${verb} -k ${GRAFANA_URL}${url}" 25 | [[ -n "${params}" ]] && cmd="${cmd} -d \"${params}\"" 26 | [[ -n "${bodyfile}" ]] && cmd="${cmd} --data @${bodyfile}" 27 | echo "Running ${cmd}" 28 | eval ${cmd} || return 1 29 | return 0 30 | } 31 | 32 | wait_for_api() { 33 | while ! grafana_api GET /api/user/preferences 34 | do 35 | sleep 5 36 | done 37 | } 38 | 39 | install_datasources() { 40 | local datasource 41 | 42 | for datasource in ${DATASOURCES_PATH}/*.json 43 | do 44 | if [[ -f "${datasource}" ]]; then 45 | echo "Installing datasource ${datasource}" 46 | if grafana_api POST /api/datasources "" "${datasource}"; then 47 | echo "installed ok" 48 | else 49 | echo "install failed" 50 | fi 51 | fi 52 | done 53 | } 54 | 55 | install_dashboards() { 56 | local dashboard 57 | 58 | for dashboard in ${DASHBOARDS_PATH}/*.json 59 | do 60 | if [[ -f "${dashboard}" ]]; then 61 | echo "Installing dashboard ${dashboard}" 62 | 63 | echo "{\"dashboard\": `cat $dashboard`}" > "${dashboard}.wrapped" 64 | 65 | if grafana_api POST /api/dashboards/db "" "${dashboard}.wrapped"; then 66 | echo "installed ok" 67 | else 68 | echo "install failed" 69 | fi 70 | 71 | rm "${dashboard}.wrapped" 72 | fi 73 | done 74 | } 75 | 76 | configure_grafana() { 77 | wait_for_api 78 | install_datasources 79 | install_dashboards 80 | } 81 | 82 | echo "Running configure_grafana in the background..." 83 | configure_grafana & 84 | /run.sh 85 | exit 0 -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | networks: 4 | monitor-net: 5 | driver: bridge 6 | 7 | volumes: 8 | prometheus_data: {} 9 | grafana_data: {} 10 | 11 | services: 12 | 13 | prometheus: 14 | image: prom/prometheus:v2.1.0 15 | container_name: prometheus 16 | volumes: 17 | - ./prometheus/:/etc/prometheus/ 18 | - prometheus_data:/prometheus 19 | command: 20 | - '--config.file=/etc/prometheus/prometheus.yml' 21 | - '--storage.tsdb.path=/prometheus' 22 | - '--web.console.libraries=/etc/prometheus/console_libraries' 23 | - '--web.console.templates=/etc/prometheus/consoles' 24 | - '--storage.tsdb.retention=200h' 25 | - '--web.enable-lifecycle' 26 | restart: unless-stopped 27 | expose: 28 | - 9090 29 | networks: 30 | - monitor-net 31 | labels: 32 | org.label-schema.group: "monitoring" 33 | 34 | alertmanager: 35 | image: prom/alertmanager:v0.13.0 36 | container_name: alertmanager 37 | volumes: 38 | - ./alertmanager/:/etc/alertmanager/ 39 | command: 40 | - '--config.file=/etc/alertmanager/config.yml' 41 | - '--storage.path=/alertmanager' 42 | restart: unless-stopped 43 | expose: 44 | - 9093 45 | networks: 46 | - monitor-net 47 | labels: 48 | org.label-schema.group: "monitoring" 49 | 50 | 51 | statsd_exporter: 52 | container_name: statsd_exporter 53 | image: prom/statsd-exporter 54 | expose: 55 | # web port for prometheus 56 | - 9102 57 | ports: 58 | - "49125:9125" 59 | - "49125:9125/udp" 60 | networks: 61 | - monitor-net 62 | 63 | as: 64 | container_name: asterisk_stats 65 | build: . 66 | restart: unless-stopped 67 | environment: 68 | - AMI_USER=${AMI_USER} 69 | - AMI_SECRET=${AMI_SECRET} 70 | - AMI_HOST=${AMI_HOST} 71 | - AMI_PORT=${AMI_PORT} 72 | - STATSD_HOST=statsd_exporter:9125 73 | networks: 74 | - monitor-net 75 | 76 | grafana: 77 | image: grafana/grafana:4.6.3 78 | container_name: grafana 79 | volumes: 80 | - grafana_data:/var/lib/grafana 81 | - ./grafana/datasources:/etc/grafana/datasources 82 | - ./grafana/dashboards:/etc/grafana/dashboards 83 | - ./grafana/setup.sh:/setup.sh 84 | entrypoint: /setup.sh 85 | environment: 86 | - GF_SECURITY_ADMIN_USER=${ADMIN_USER:-admin} 87 | - GF_SECURITY_ADMIN_PASSWORD=${ADMIN_PASSWORD:-admin} 88 | - GF_USERS_ALLOW_SIGN_UP=false 89 | restart: unless-stopped 90 | expose: 91 | - 3000 92 | networks: 93 | - monitor-net 94 | labels: 95 | org.label-schema.group: "monitoring" 96 | -------------------------------------------------------------------------------- /main.py: -------------------------------------------------------------------------------- 1 | import asyncio 2 | import inspect 3 | import logging 4 | import os 5 | import sys 6 | from panoramisk import Manager 7 | import statsd 8 | 9 | # Pometheus push gateway 10 | STATSD_HOST = os.environ.get('STATSD_HOST', 'localhost:9125') 11 | AMI_HOST = os.environ.get('AMI_HOST', 'localhost') 12 | AMI_PORT = os.environ.get('AMI_PORT', '5038') 13 | AMI_USER = os.environ.get('AMI_USER', 'asterisk') 14 | AMI_SECRET = os.environ.get('AMI_SECRET', 'secret') 15 | 16 | stats = statsd.StatsClient(*STATSD_HOST.split(':')) 17 | 18 | loop = asyncio.get_event_loop() 19 | 20 | logging.basicConfig() 21 | logger = logging.getLogger(__name__) 22 | logger.setLevel(level=logging.DEBUG) 23 | 24 | # Asterisk AMI manager client 25 | manager = Manager(loop=loop, 26 | host=AMI_HOST, port=AMI_PORT, 27 | username=AMI_USER, 28 | secret=AMI_SECRET) 29 | manager.loop.set_debug(True) 30 | 31 | channels_current = {} # Current channels gauge 32 | sip_reachable_peers = set() 33 | 34 | def main(): 35 | logger.info('Connecting to {}:{}.'.format(AMI_HOST, AMI_PORT)) 36 | manager.connect() 37 | try: 38 | loop.run_forever() 39 | except KeyboardInterrupt: 40 | loop.close() 41 | 42 | 43 | @manager.register_event('FullyBooted') 44 | def on_asterisk_FullyBooted(manager, msg): 45 | if msg.Uptime: 46 | stats.gauge('asterisk_uptime', int(msg.Uptime)) 47 | if msg.LastReload: 48 | stats.gauge('asterisk_last_reload', int(msg.LastReload)) 49 | # Get initial channels 50 | ShowChannels = yield from manager.send_action({'Action': 'CoreShowChannels'}) 51 | channels = list(filter(lambda x: x.Event == 'CoreShowChannel', ShowChannels)) 52 | 53 | sip_channels = len(list(filter(lambda x: x.Channel.startswith('SIP/'), channels))) 54 | pjsip_channels = len(list(filter(lambda x: x.Channel.startswith('PJSIP/'), channels))) 55 | iax2_channels = len(list(filter(lambda x: x.Channel.startswith('IAX2/'), channels))) 56 | dahdi_channels = len(list(filter(lambda x: x.Channel.startswith('DAHDI/'), channels))) 57 | local_channels = len(list(filter(lambda x: x.Channel.startswith('Local/'), channels))) 58 | channels_current['sip'] = sip_channels 59 | channels_current['pjsip'] = pjsip_channels 60 | channels_current['iax2'] = iax2_channels 61 | channels_current['dahdi'] = dahdi_channels 62 | channels_current['local'] = local_channels 63 | sip_channels and stats.gauge('asterisk_channels_current', sip_channels, tags={'channel':'sip'}) 64 | pjsip_channels and stats.gauge('asterisk_channels_current', pjsip_channels, tags={'channel':'pjsip'}) 65 | iax2_channels and stats.gauge('asterisk_channels_current', iax2_channels, tags={'channel':'iax2'}) 66 | 67 | 68 | @manager.register_event('Newchannel') 69 | def on_asterisk_Newchannel(manager, msg): 70 | channel=msg.Channel.split('/')[0].lower() 71 | stats.incr('asterisk_channels_total', tags={'channel': channel}) 72 | if channels_current.get(channel) != None: 73 | channels_current[channel] += 1 74 | else: 75 | channels_current[channel] = 0 76 | logger.debug('New channel {}, current: {}'.format(channel, channels_current[channel])) 77 | stats.gauge('asterisk_channels_current', channels_current[channel], 78 | tags={'channel':channel}) 79 | 80 | 81 | @manager.register_event('Hangup') 82 | def on_asterisk_Hangup(manager, msg): 83 | channel=msg.Channel.split('/')[0].lower() 84 | if channels_current.get(channel) != None: 85 | channels_current[channel] -= 1 86 | else: 87 | channels_current[channel] = 0 88 | logger.debug('Channel {} hangup, current: {}'.format(channel, channels_current[channel])) 89 | stats.gauge('asterisk_channels_current', channels_current[channel], 90 | tags={'channel':channel}) 91 | 92 | 93 | @manager.register_event('QueueCallerLeave') 94 | @manager.register_event('QueueCallerJoin') 95 | def on_asterisk_QueueCallerJoin(manager, msg): 96 | channel = ''.join(msg.Channel.split('-')[:-1]) 97 | logger.debug('event: {}, channel: {}, queue: {}, position: {}, count: {}'.format(msg.Event, channel, msg.Queue, msg.Position, msg.Count)) 98 | stats.gauge('asterisk_queue_callers', int(msg.Count), tags={'queue':msg.Queue}) 99 | 100 | @manager.register_event('ContactStatus') 101 | def on_asterisk_ContactStatus(manager, msg): 102 | if msg.ContactStatus == 'Reachable': 103 | logger.debug('event: {}, status: {}, peer: {}, qualify: {}'.format(msg.Event, msg.ContactStatus, msg.EndpointName, msg.RoundtripUsec)) 104 | stats.gauge('asterisk_peer_qualify_seconds', float(msg.RoundtripUsec)/1000000, tags={'peer':msg.EndpointName}) 105 | sip_reachable_peers.add('PJSIP/'+msg.EndpointName) 106 | elif msg.ContactStatus == 'Unreachable': 107 | logger.debug('event: {}, status: {}, peer: {}, qualify: {}'.format(msg.Event, msg.ContactStatus, msg.EndpointName, msg.RoundtripUsec)) 108 | #stats.gauge('asterisk_peer_qualify_seconds', float(msg.RoundtripUsec)/1000000, tags={'peer':msg.EndpointName}) 109 | sip_reachable_peers.discard('PJSIP/'+msg.EndpointName) 110 | 111 | 112 | @manager.register_event('PeerStatus') 113 | def on_asterisk_PeerStatus(manager, msg): 114 | if msg.PeerStatus in ['Reachable', 'Registered']: 115 | sip_reachable_peers.add(msg.Peer) 116 | elif msg.PeerStatus in ['Unreachable', 'Unregistered']: 117 | sip_reachable_peers.discard(msg.Peer) 118 | logger.debug('event: {}, peer: {}, status: {}'.format(msg.Event, msg.Peer, msg.PeerStatus)) 119 | stats.gauge('asterisk_sip_reachable_peers', len(sip_reachable_peers)) 120 | 121 | 122 | def on_asterisk_DialBegin(manager, msg): 123 | print (msg) 124 | 125 | 126 | def on_asterisk_DialEnd(manager, msg): 127 | print (msg) 128 | 129 | 130 | def on_asterisk_Reload(manager, msg): 131 | print (msg) 132 | 133 | 134 | 135 | if __name__ == '__main__': 136 | main() 137 | -------------------------------------------------------------------------------- /grafana/dashboards/nginx_container.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": null, 3 | "title": "Nginx", 4 | "description": "Nginx exporter metrics", 5 | "tags": [ 6 | "nginx" 7 | ], 8 | "style": "dark", 9 | "timezone": "browser", 10 | "editable": true, 11 | "hideControls": false, 12 | "sharedCrosshair": true, 13 | "rows": [ 14 | { 15 | "collapse": false, 16 | "editable": true, 17 | "height": "250px", 18 | "panels": [ 19 | { 20 | "aliasColors": {}, 21 | "bars": false, 22 | "datasource": "Prometheus", 23 | "decimals": 2, 24 | "editable": true, 25 | "error": false, 26 | "fill": 1, 27 | "grid": { 28 | "threshold1": null, 29 | "threshold1Color": "rgba(216, 200, 27, 0.27)", 30 | "threshold2": null, 31 | "threshold2Color": "rgba(234, 112, 112, 0.22)" 32 | }, 33 | "id": 3, 34 | "isNew": true, 35 | "legend": { 36 | "alignAsTable": true, 37 | "avg": true, 38 | "current": true, 39 | "max": true, 40 | "min": true, 41 | "rightSide": true, 42 | "show": true, 43 | "total": false, 44 | "values": true 45 | }, 46 | "lines": true, 47 | "linewidth": 2, 48 | "links": [], 49 | "nullPointMode": "connected", 50 | "percentage": false, 51 | "pointradius": 5, 52 | "points": false, 53 | "renderer": "flot", 54 | "seriesOverrides": [], 55 | "span": 12, 56 | "stack": false, 57 | "steppedLine": false, 58 | "targets": [ 59 | { 60 | "expr": "sum(irate(nginx_connections_processed_total{stage=\"any\"}[5m])) by (stage)", 61 | "hide": false, 62 | "interval": "", 63 | "intervalFactor": 10, 64 | "legendFormat": "requests", 65 | "metric": "", 66 | "refId": "B", 67 | "step": 10 68 | } 69 | ], 70 | "timeFrom": null, 71 | "timeShift": null, 72 | "title": "Requests/sec", 73 | "tooltip": { 74 | "msResolution": false, 75 | "shared": true, 76 | "sort": 0, 77 | "value_type": "cumulative" 78 | }, 79 | "type": "graph", 80 | "xaxis": { 81 | "show": true 82 | }, 83 | "yaxes": [ 84 | { 85 | "format": "short", 86 | "label": null, 87 | "logBase": 1, 88 | "max": null, 89 | "min": 0, 90 | "show": true 91 | }, 92 | { 93 | "format": "short", 94 | "label": null, 95 | "logBase": 1, 96 | "max": null, 97 | "min": null, 98 | "show": true 99 | } 100 | ] 101 | }, 102 | { 103 | "aliasColors": {}, 104 | "bars": false, 105 | "datasource": "Prometheus", 106 | "decimals": 2, 107 | "editable": true, 108 | "error": false, 109 | "fill": 1, 110 | "grid": { 111 | "threshold1": null, 112 | "threshold1Color": "rgba(216, 200, 27, 0.27)", 113 | "threshold2": null, 114 | "threshold2Color": "rgba(234, 112, 112, 0.22)" 115 | }, 116 | "id": 2, 117 | "isNew": true, 118 | "legend": { 119 | "alignAsTable": true, 120 | "avg": true, 121 | "current": true, 122 | "max": true, 123 | "min": true, 124 | "rightSide": true, 125 | "show": true, 126 | "total": false, 127 | "values": true 128 | }, 129 | "lines": true, 130 | "linewidth": 2, 131 | "links": [], 132 | "nullPointMode": "connected", 133 | "percentage": false, 134 | "pointradius": 5, 135 | "points": false, 136 | "renderer": "flot", 137 | "seriesOverrides": [], 138 | "span": 12, 139 | "stack": false, 140 | "steppedLine": false, 141 | "targets": [ 142 | { 143 | "expr": "sum(nginx_connections_current) by (state)", 144 | "interval": "", 145 | "intervalFactor": 2, 146 | "legendFormat": "{{state}}", 147 | "metric": "", 148 | "refId": "A", 149 | "step": 2 150 | } 151 | ], 152 | "timeFrom": null, 153 | "timeShift": null, 154 | "title": "Connections", 155 | "tooltip": { 156 | "msResolution": false, 157 | "shared": true, 158 | "sort": 0, 159 | "value_type": "cumulative" 160 | }, 161 | "type": "graph", 162 | "xaxis": { 163 | "show": true 164 | }, 165 | "yaxes": [ 166 | { 167 | "format": "short", 168 | "label": null, 169 | "logBase": 1, 170 | "max": null, 171 | "min": 0, 172 | "show": true 173 | }, 174 | { 175 | "format": "short", 176 | "label": null, 177 | "logBase": 1, 178 | "max": null, 179 | "min": null, 180 | "show": true 181 | } 182 | ] 183 | }, 184 | { 185 | "aliasColors": {}, 186 | "bars": false, 187 | "datasource": "Prometheus", 188 | "decimals": 2, 189 | "editable": true, 190 | "error": false, 191 | "fill": 1, 192 | "grid": { 193 | "threshold1": null, 194 | "threshold1Color": "rgba(216, 200, 27, 0.27)", 195 | "threshold2": null, 196 | "threshold2Color": "rgba(234, 112, 112, 0.22)" 197 | }, 198 | "id": 1, 199 | "isNew": true, 200 | "legend": { 201 | "alignAsTable": true, 202 | "avg": true, 203 | "current": true, 204 | "max": true, 205 | "min": true, 206 | "rightSide": true, 207 | "show": true, 208 | "total": false, 209 | "values": true 210 | }, 211 | "lines": true, 212 | "linewidth": 2, 213 | "links": [], 214 | "nullPointMode": "connected", 215 | "percentage": false, 216 | "pointradius": 5, 217 | "points": false, 218 | "renderer": "flot", 219 | "seriesOverrides": [], 220 | "span": 12, 221 | "stack": false, 222 | "steppedLine": false, 223 | "targets": [ 224 | { 225 | "expr": "sum(irate(nginx_connections_processed_total{stage!=\"any\"}[5m])) by (stage)", 226 | "hide": false, 227 | "interval": "", 228 | "intervalFactor": 10, 229 | "legendFormat": "{{stage}}", 230 | "metric": "", 231 | "refId": "B", 232 | "step": 10 233 | } 234 | ], 235 | "timeFrom": null, 236 | "timeShift": null, 237 | "title": "Connections rate", 238 | "tooltip": { 239 | "msResolution": false, 240 | "shared": true, 241 | "sort": 0, 242 | "value_type": "cumulative" 243 | }, 244 | "type": "graph", 245 | "xaxis": { 246 | "show": true 247 | }, 248 | "yaxes": [ 249 | { 250 | "format": "short", 251 | "label": null, 252 | "logBase": 1, 253 | "max": null, 254 | "min": 0, 255 | "show": true 256 | }, 257 | { 258 | "format": "short", 259 | "label": null, 260 | "logBase": 1, 261 | "max": null, 262 | "min": null, 263 | "show": true 264 | } 265 | ] 266 | } 267 | ], 268 | "title": "Nginx exporter metrics" 269 | }, 270 | { 271 | "collapse": false, 272 | "editable": true, 273 | "height": "250px", 274 | "panels": [ 275 | { 276 | "aliasColors": {}, 277 | "bars": false, 278 | "datasource": null, 279 | "editable": true, 280 | "error": false, 281 | "fill": 1, 282 | "grid": { 283 | "threshold1": null, 284 | "threshold1Color": "rgba(216, 200, 27, 0.27)", 285 | "threshold2": null, 286 | "threshold2Color": "rgba(234, 112, 112, 0.22)" 287 | }, 288 | "id": 4, 289 | "isNew": true, 290 | "legend": { 291 | "alignAsTable": true, 292 | "avg": true, 293 | "current": true, 294 | "max": true, 295 | "min": true, 296 | "rightSide": true, 297 | "show": true, 298 | "total": false, 299 | "values": true 300 | }, 301 | "lines": true, 302 | "linewidth": 2, 303 | "links": [], 304 | "nullPointMode": "connected", 305 | "percentage": false, 306 | "pointradius": 5, 307 | "points": false, 308 | "renderer": "flot", 309 | "seriesOverrides": [], 310 | "span": 12, 311 | "stack": false, 312 | "steppedLine": false, 313 | "targets": [ 314 | { 315 | "expr": "sum(rate(container_cpu_usage_seconds_total{name=~\"nginx\"}[5m])) / count(node_cpu{mode=\"system\"}) * 100", 316 | "intervalFactor": 2, 317 | "legendFormat": "nginx", 318 | "refId": "A", 319 | "step": 2 320 | } 321 | ], 322 | "timeFrom": null, 323 | "timeShift": null, 324 | "title": "CPU usage", 325 | "tooltip": { 326 | "msResolution": false, 327 | "shared": true, 328 | "sort": 0, 329 | "value_type": "cumulative" 330 | }, 331 | "type": "graph", 332 | "xaxis": { 333 | "show": true 334 | }, 335 | "yaxes": [ 336 | { 337 | "format": "short", 338 | "label": null, 339 | "logBase": 1, 340 | "max": null, 341 | "min": null, 342 | "show": true 343 | }, 344 | { 345 | "format": "short", 346 | "label": null, 347 | "logBase": 1, 348 | "max": null, 349 | "min": null, 350 | "show": true 351 | } 352 | ] 353 | } 354 | ], 355 | "title": "Nginx container metrics" 356 | } 357 | ], 358 | "time": { 359 | "from": "now-15m", 360 | "to": "now" 361 | }, 362 | "timepicker": { 363 | "refresh_intervals": [ 364 | "5s", 365 | "10s", 366 | "30s", 367 | "1m", 368 | "5m", 369 | "15m", 370 | "30m", 371 | "1h", 372 | "2h", 373 | "1d" 374 | ], 375 | "time_options": [ 376 | "5m", 377 | "15m", 378 | "1h", 379 | "6h", 380 | "12h", 381 | "24h", 382 | "2d", 383 | "7d", 384 | "30d" 385 | ] 386 | }, 387 | "templating": { 388 | "list": [] 389 | }, 390 | "annotations": { 391 | "list": [] 392 | }, 393 | "refresh": "10s", 394 | "schemaVersion": 12, 395 | "version": 9, 396 | "links": [], 397 | "gnetId": null 398 | } 399 | -------------------------------------------------------------------------------- /examples/asterisk13.events: -------------------------------------------------------------------------------- 1 | *CLI> <-- Examining AMI event: --> 2 | <-- Examining AMI event: --> 3 | Event: Newchannel 4 | Privilege: call,all 5 | SequenceNumber: 54744 6 | File: manager_channels.c 7 | Line: 734 8 | Func: channel_snapshot_update 9 | Channel: PJSIP/701-00000063 10 | ChannelState: 4 11 | ChannelStateDesc: Ring 12 | CallerIDNum: 701 13 | CallerIDName: LitniAlex 14 | ConnectedLineNum: 15 | ConnectedLineName: 16 | Language: ru 17 | AccountCode: 701 18 | Context: from-internal 19 | Exten: test 20 | Priority: 1 21 | Uniqueid: 1521091815.149 22 | Linkedid: 1521091815.149 23 | 24 | 25 | <-- Examining AMI event: --> 26 | Event: Newstate 27 | Privilege: call,all 28 | SequenceNumber: 54748 29 | File: manager_channels.c 30 | Line: 734 31 | Func: channel_snapshot_update 32 | Channel: PJSIP/701-00000063 33 | ChannelState: 6 34 | ChannelStateDesc: Up 35 | CallerIDNum: 701 36 | CallerIDName: LitniAlex 37 | ConnectedLineNum: 38 | ConnectedLineName: 39 | Language: ru 40 | AccountCode: 701 41 | Context: from-internal 42 | Exten: test 43 | Priority: 1 44 | Uniqueid: 1521091815.149 45 | Linkedid: 1521091815.149 46 | 47 | 48 | <-- Examining AMI event: --> 49 | Event: DeviceStateChange 50 | Privilege: call,all 51 | SequenceNumber: 54749 52 | File: manager.c 53 | Line: 1838 54 | Func: manager_default_msg_cb 55 | Device: PJSIP/701 56 | State: INUSE 57 | 58 | 59 | <-- Examining AMI event: --> 60 | Event: DeviceStateChange 61 | Privilege: call,all 62 | SequenceNumber: 54751 63 | File: manager.c 64 | Line: 1838 65 | Func: manager_default_msg_cb 66 | Device: Queue:q1 67 | State: RINGING 68 | 69 | 70 | <-- Examining AMI event: --> 71 | Event: QueueCallerJoin 72 | Privilege: agent,all 73 | SequenceNumber: 54752 74 | File: manager.c 75 | Line: 1838 76 | Func: manager_default_msg_cb 77 | Channel: PJSIP/701-00000063 78 | ChannelState: 6 79 | ChannelStateDesc: Up 80 | CallerIDNum: 701 81 | CallerIDName: LitniAlex 82 | ConnectedLineNum: 83 | ConnectedLineName: 84 | Language: ru 85 | AccountCode: 701 86 | Context: from-internal 87 | Exten: test 88 | Priority: 2 89 | Uniqueid: 1521091815.149 90 | Linkedid: 1521091815.149 91 | Queue: q1 92 | Count: 1 93 | Position: 1 94 | 95 | <-- Examining AMI event: --> 96 | Event: AgentCalled 97 | Privilege: agent,all 98 | SequenceNumber: 54762 99 | File: manager.c 100 | Line: 1838 101 | Func: manager_default_msg_cb 102 | Channel: PJSIP/701-00000063 103 | ChannelState: 6 104 | ChannelStateDesc: Up 105 | CallerIDNum: 701 106 | CallerIDName: LitniAlex 107 | ConnectedLineNum: 108 | ConnectedLineName: 109 | Language: ru 110 | AccountCode: 701 111 | Context: from-internal 112 | Exten: test 113 | Priority: 2 114 | Uniqueid: 1521091815.149 115 | Linkedid: 1521091815.149 116 | DestChannel: Local/waitanswer@features-00000018;1 117 | DestChannelState: 0 118 | DestChannelStateDesc: Down 119 | DestCallerIDNum: test 120 | DestCallerIDName: 121 | DestConnectedLineNum: 701 122 | DestConnectedLineName: LitniAlex 123 | DestLanguage: ru 124 | DestAccountCode: 125 | DestContext: features 126 | DestExten: test 127 | DestPriority: 1 128 | DestUniqueid: 1521091815.150 129 | DestLinkedid: 1521091815.149 130 | MemberName: Local/waitanswer@features 131 | Queue: q1 132 | Interface: Local/waitanswer@features 133 | 134 | 135 | <-- Examining AMI event: --> 136 | Event: Newstate 137 | Privilege: call,all 138 | SequenceNumber: 54767 139 | File: manager_channels.c 140 | Line: 734 141 | Func: channel_snapshot_update 142 | Channel: Local/waitanswer@features-00000018;1 143 | ChannelState: 6 144 | ChannelStateDesc: Up 145 | CallerIDNum: test 146 | CallerIDName: 147 | ConnectedLineNum: 701 148 | ConnectedLineName: LitniAlex 149 | Language: ru 150 | AccountCode: 151 | Context: features 152 | Exten: test 153 | Priority: 1 154 | Uniqueid: 1521091815.150 155 | Linkedid: 1521091815.149 156 | 157 | 158 | -- Stopped music on hold on PJSIP/701-00000063 159 | <-- Examining AMI event: --> 160 | Event: DeviceStateChange 161 | Privilege: call,all 162 | SequenceNumber: 54770 163 | File: manager.c 164 | Line: 1838 165 | Func: manager_default_msg_cb 166 | Device: Local/waitanswer@features 167 | State: INUSE 168 | 169 | 170 | <-- Examining AMI event: --> 171 | Event: QueueMemberStatus 172 | Privilege: agent,all 173 | SequenceNumber: 54772 174 | File: manager.c 175 | Line: 1838 176 | Func: manager_default_msg_cb 177 | Queue: q1 178 | StateInterface: Local/waitanswer@features 179 | Ringinuse: 1 180 | MemberName: Local/waitanswer@features 181 | Paused: 0 182 | Interface: Local/waitanswer@features 183 | Penalty: 0 184 | Status: 2 185 | Membership: static 186 | CallsTaken: 6 187 | InCall: 0 188 | LastCall: 1520410533 189 | PausedReason: 190 | 191 | 192 | <-- Examining AMI event: --> 193 | Event: DeviceStateChange 194 | Privilege: call,all 195 | SequenceNumber: 54774 196 | File: manager.c 197 | Line: 1838 198 | Func: manager_default_msg_cb 199 | Device: Queue:q1 200 | State: NOT_INUSE 201 | 202 | 203 | <-- Examining AMI event: --> 204 | Event: QueueCallerLeave 205 | Privilege: agent,all 206 | SequenceNumber: 54775 207 | File: manager.c 208 | Line: 1838 209 | Func: manager_default_msg_cb 210 | Channel: PJSIP/701-00000063 211 | ChannelState: 6 212 | ChannelStateDesc: Up 213 | CallerIDNum: 701 214 | CallerIDName: LitniAlex 215 | ConnectedLineNum: 216 | ConnectedLineName: 217 | Language: ru 218 | AccountCode: 701 219 | Context: from-internal 220 | Exten: test 221 | Priority: 2 222 | Uniqueid: 1521091815.149 223 | Linkedid: 1521091815.149 224 | Queue: q1 225 | Count: 0 226 | Position: 1 227 | 228 | <-- Examining AMI event: --> 229 | Event: DeviceStateChange 230 | Privilege: call,all 231 | SequenceNumber: 54778 232 | File: manager.c 233 | Line: 1838 234 | Func: manager_default_msg_cb 235 | Device: Local/waitanswer@features 236 | State: INUSE 237 | 238 | 239 | <-- Examining AMI event: --> 240 | Event: QueueMemberStatus 241 | Privilege: agent,all 242 | SequenceNumber: 54779 243 | File: manager.c 244 | Line: 1838 245 | Func: manager_default_msg_cb 246 | Queue: q1 247 | StateInterface: Local/waitanswer@features 248 | Ringinuse: 1 249 | MemberName: Local/waitanswer@features 250 | Paused: 0 251 | Interface: Local/waitanswer@features 252 | Penalty: 0 253 | Status: 2 254 | Membership: static 255 | CallsTaken: 6 256 | InCall: 0 257 | LastCall: 1520410533 258 | PausedReason: 259 | 260 | 261 | <-- Examining AMI event: --> 262 | Event: AgentConnect 263 | Privilege: agent,all 264 | SequenceNumber: 54780 265 | File: manager.c 266 | Line: 1838 267 | Func: manager_default_msg_cb 268 | Channel: PJSIP/701-00000063 269 | ChannelState: 6 270 | ChannelStateDesc: Up 271 | CallerIDNum: 701 272 | CallerIDName: LitniAlex 273 | ConnectedLineNum: 274 | ConnectedLineName: 275 | Language: ru 276 | AccountCode: 701 277 | Context: from-internal 278 | Exten: test 279 | Priority: 2 280 | Uniqueid: 1521091815.149 281 | Linkedid: 1521091815.149 282 | DestChannel: Local/waitanswer@features-00000018;1 283 | DestChannelState: 6 284 | DestChannelStateDesc: Up 285 | DestCallerIDNum: test 286 | DestCallerIDName: 287 | DestConnectedLineNum: 701 288 | DestConnectedLineName: LitniAlex 289 | DestLanguage: ru 290 | DestAccountCode: 291 | DestContext: features 292 | DestExten: test 293 | DestPriority: 1 294 | DestUniqueid: 1521091815.150 295 | DestLinkedid: 1521091815.149 296 | HoldTime: 3 297 | MemberName: Local/waitanswer@features 298 | Queue: q1 299 | Interface: Local/waitanswer@features 300 | RingTime: 3 301 | 302 | 303 | -- Channel PJSIP/701-00000063 left 'simple_bridge' basic-bridge <543f26a9-9a2f-4b2c-bca7-812cc421c3b5> 304 | <-- Examining AMI event: --> 305 | Event: HangupRequest 306 | Privilege: call,all 307 | SequenceNumber: 54794 308 | File: manager_channels.c 309 | Line: 794 310 | Func: channel_hangup_request_cb 311 | Channel: PJSIP/701-00000063 312 | ChannelState: 6 313 | ChannelStateDesc: Up 314 | CallerIDNum: 701 315 | CallerIDName: LitniAlex 316 | ConnectedLineNum: 317 | ConnectedLineName: 318 | Language: ru 319 | AccountCode: 701 320 | Context: from-internal 321 | Exten: test 322 | Priority: 2 323 | Uniqueid: 1521091815.149 324 | Linkedid: 1521091815.149 325 | Cause: 16 326 | 327 | 328 | == Spawn extension (from-internal, test, 2) exited non-zero on 'PJSIP/701-00000063' 329 | -- Executing [h@from-internal:1] GotoIf("PJSIP/701-00000063", "?:hangup") in new stack 330 | -- Goto (from-internal,h,16) 331 | -- Executing [h@from-internal:16] Hangup("PJSIP/701-00000063", "") in new stack 332 | -- Channel Local/waitanswer@features-00000018;1 left 'simple_bridge' basic-bridge <543f26a9-9a2f-4b2c-bca7-812cc421c3b5> 333 | == Spawn extension (from-internal, h, 16) exited non-zero on 'PJSIP/701-00000063' 334 | 335 | <-- Examining AMI event: --> 336 | Event: AgentComplete 337 | Privilege: agent,all 338 | SequenceNumber: 54798 339 | File: manager.c 340 | Line: 1838 341 | Func: manager_default_msg_cb 342 | Channel: PJSIP/701-00000063 343 | ChannelState: 6 344 | ChannelStateDesc: Up 345 | CallerIDNum: 701 346 | CallerIDName: LitniAlex 347 | ConnectedLineNum: 348 | ConnectedLineName: 349 | Language: ru 350 | AccountCode: 701 351 | Context: from-internal 352 | Exten: test 353 | Priority: 2 354 | Uniqueid: 1521091815.149 355 | Linkedid: 1521091815.149 356 | DestChannel: Local/waitanswer@features-00000018;1 357 | DestChannelState: 6 358 | DestChannelStateDesc: Up 359 | DestCallerIDNum: test 360 | DestCallerIDName: 361 | DestConnectedLineNum: 701 362 | DestConnectedLineName: LitniAlex 363 | DestLanguage: ru 364 | DestAccountCode: 365 | DestContext: features 366 | DestExten: test 367 | DestPriority: 1 368 | DestUniqueid: 1521091815.150 369 | DestLinkedid: 1521091815.149 370 | HoldTime: 3 371 | MemberName: Local/waitanswer@features 372 | Queue: q1 373 | Interface: Local/waitanswer@features 374 | TalkTime: 9 375 | Reason: caller 376 | 377 | 378 | <-- Examining AMI event: --> 379 | Event: DeviceStateChange 380 | Privilege: call,all 381 | SequenceNumber: 54808 382 | File: manager.c 383 | Line: 1838 384 | Func: manager_default_msg_cb 385 | Device: Local/waitanswer@features 386 | State: NOT_INUSE 387 | 388 | 389 | <-- Examining AMI event: --> 390 | Event: QueueMemberStatus 391 | Privilege: agent,all 392 | SequenceNumber: 54809 393 | File: manager.c 394 | Line: 1838 395 | Func: manager_default_msg_cb 396 | Queue: q1 397 | StateInterface: Local/waitanswer@features 398 | Ringinuse: 1 399 | MemberName: Local/waitanswer@features 400 | Paused: 0 401 | Interface: Local/waitanswer@features 402 | Penalty: 0 403 | Status: 1 404 | Membership: static 405 | CallsTaken: 7 406 | InCall: 0 407 | LastCall: 1521091827 408 | PausedReason: 409 | 410 | 411 | <-- Examining AMI event: --> 412 | Event: DeviceStateChange 413 | Privilege: call,all 414 | SequenceNumber: 54812 415 | File: manager.c 416 | Line: 1838 417 | Func: manager_default_msg_cb 418 | Device: Local/waitanswer@features 419 | State: NOT_INUSE 420 | 421 | 422 | <-- Examining AMI event: --> 423 | Event: DeviceStateChange 424 | Privilege: call,all 425 | SequenceNumber: 54813 426 | File: manager.c 427 | Line: 1838 428 | Func: manager_default_msg_cb 429 | Device: PJSIP/701 430 | State: NOT_INUSE 431 | 432 | 433 | <-- Examining AMI event: --> 434 | Event: QueueMemberStatus 435 | Privilege: agent,all 436 | SequenceNumber: 54814 437 | File: manager.c 438 | Line: 1838 439 | Func: manager_default_msg_cb 440 | Queue: q1 441 | StateInterface: Local/waitanswer@features 442 | Ringinuse: 1 443 | MemberName: Local/waitanswer@features 444 | Paused: 0 445 | Interface: Local/waitanswer@features 446 | Penalty: 0 447 | Status: 1 448 | Membership: static 449 | CallsTaken: 7 450 | InCall: 0 451 | LastCall: 1521091827 452 | PausedReason: 453 | 454 | 455 | ================ ContactStatus ================= 456 | <-- Examining AMI event: --> 457 | Event: ContactStatus 458 | Privilege: system,all 459 | SequenceNumber: 56660 460 | File: manager.c 461 | Line: 1838 462 | Func: manager_default_msg_cb 463 | URI: sip:701@10.2.2.2:5068;line=6099459e665a8c7 464 | ContactStatus: Reachable 465 | AOR: 701 466 | EndpointName: 701 467 | RoundtripUsec: 34955 468 | 469 | <-- Examining AMI event: --> [0/1813] 470 | Event: ContactStatus 471 | Privilege: system,all 472 | SequenceNumber: 56739 473 | File: manager.c 474 | Line: 1838 475 | Func: manager_default_msg_cb 476 | URI: sip:701@62.183.125.47:19093 477 | ContactStatus: Unreachable 478 | AOR: 701 479 | EndpointName: 701 480 | RoundtripUsec: 0 481 | 482 | <-- Examining AMI event: --> 483 | Event: ContactStatus 484 | Privilege: system,all 485 | SequenceNumber: 56779 486 | File: manager.c 487 | Line: 1838 488 | Func: manager_default_msg_cb 489 | URI: sip:701@62.183.125.47:28818 490 | ContactStatus: Created 491 | AOR: 701 492 | EndpointName: 701 493 | RoundtripUsec: 0 494 | 495 | 496 | ========================== PeerStatus =================== 497 | <-- Examining AMI event: --> 498 | Event: PeerStatus 499 | Privilege: system,all 500 | SequenceNumber: 5545 501 | File: manager.c 502 | Line: 1838 503 | Func: manager_default_msg_cb 504 | ChannelType: PJSIP 505 | Peer: PJSIP/701 506 | PeerStatus: Reachable 507 | 508 | == Endpoint 701 is now Unreachable 509 | <-- Examining AMI event: --> 510 | Event: PeerStatus 511 | Privilege: system,all 512 | SequenceNumber: 56740 513 | File: manager.c 514 | Line: 1838 515 | Func: manager_default_msg_cb 516 | ChannelType: PJSIP 517 | Peer: PJSIP/701 518 | PeerStatus: Unreachable 519 | 520 | ----------- chan_sip.so ----------- 521 | Event: PeerStatus. 522 | Privilege: system,all. 523 | ChannelType: SIP. 524 | Peer: SIP/701. 525 | PeerStatus: Registered. 526 | Address: 10.2.2.2:5068. 527 | . 528 | 529 | <-- Examining AMI event: --> 530 | Event: PeerStatus 531 | Privilege: system,all 532 | SequenceNumber: 57191 533 | File: manager.c 534 | Line: 1838 535 | Func: manager_default_msg_cb 536 | ChannelType: SIP 537 | Peer: SIP/701 538 | PeerStatus: Reachable 539 | 540 | <-- Examining AMI event: --> 541 | Event: PeerStatus. 542 | Privilege: system,all. 543 | ChannelType: SIP. 544 | Peer: SIP/701. 545 | PeerStatus: Lagged. 546 | 547 | <-- Examining AMI event: --> 548 | Event: PeerStatus 549 | Privilege: system,all 550 | SequenceNumber: 97 551 | File: manager.c 552 | Line: 1838 553 | Func: manager_default_msg_cb 554 | ChannelType: SIP 555 | Peer: SIP/701 556 | PeerStatus: Unregistered 557 | Cause: Expired 558 | 559 | ====================== DeviceStateChange ============= 560 | <-- Examining AMI event: --> 561 | Event: DeviceStateChange 562 | Privilege: call,all 563 | SequenceNumber: 56741 564 | File: manager.c 565 | Line: 1838 566 | Func: manager_default_msg_cb 567 | Device: PJSIP/701 568 | State: UNAVAILABLE 569 | 570 | <-- Examining AMI event: --> 571 | Event: DeviceStateChange 572 | Privilege: call,all 573 | SequenceNumber: 56781 574 | File: manager.c 575 | Line: 1838 576 | Func: manager_default_msg_cb 577 | Device: PJSIP/701 578 | State: NOT_INUSE 579 | 580 | 581 | ================= Registry ============================= 582 | <-- Examining AMI event: --> 583 | Event: Registry 584 | Privilege: system,all 585 | SequenceNumber: 56706 586 | File: manager.c 587 | Line: 1838 588 | Func: manager_default_msg_cb 589 | ChannelType: PJSIP 590 | Username: sip:79267128579@multifon.ru 591 | Domain: sip:multifon.ru 592 | Status: Registered 593 | 594 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /grafana/dashboards/docker_containers.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": null, 3 | "title": "Docker Containers", 4 | "description": "Containers metrics", 5 | "tags": [ 6 | "docker" 7 | ], 8 | "style": "dark", 9 | "timezone": "browser", 10 | "editable": true, 11 | "hideControls": false, 12 | "sharedCrosshair": true, 13 | "rows": [ 14 | { 15 | "collapse": false, 16 | "editable": true, 17 | "height": "150px", 18 | "panels": [ 19 | { 20 | "cacheTimeout": null, 21 | "colorBackground": false, 22 | "colorValue": false, 23 | "colors": [ 24 | "rgba(50, 172, 45, 0.97)", 25 | "rgba(237, 129, 40, 0.89)", 26 | "rgba(245, 54, 54, 0.9)" 27 | ], 28 | "datasource": "Prometheus", 29 | "decimals": 2, 30 | "editable": true, 31 | "error": false, 32 | "format": "percent", 33 | "gauge": { 34 | "maxValue": 100, 35 | "minValue": 0, 36 | "show": true, 37 | "thresholdLabels": false, 38 | "thresholdMarkers": true 39 | }, 40 | "id": 4, 41 | "interval": null, 42 | "isNew": true, 43 | "links": [], 44 | "mappingType": 1, 45 | "mappingTypes": [ 46 | { 47 | "name": "value to text", 48 | "value": 1 49 | }, 50 | { 51 | "name": "range to text", 52 | "value": 2 53 | } 54 | ], 55 | "maxDataPoints": 100, 56 | "nullPointMode": "connected", 57 | "nullText": null, 58 | "postfix": "", 59 | "postfixFontSize": "50%", 60 | "prefix": "", 61 | "prefixFontSize": "50%", 62 | "rangeMaps": [ 63 | { 64 | "from": "null", 65 | "text": "N/A", 66 | "to": "null" 67 | } 68 | ], 69 | "span": 2, 70 | "sparkline": { 71 | "fillColor": "rgba(31, 118, 189, 0.18)", 72 | "full": false, 73 | "lineColor": "rgb(31, 120, 193)", 74 | "show": false 75 | }, 76 | "targets": [ 77 | { 78 | "expr": "sum(rate(container_cpu_user_seconds_total{image!=\"\"}[1m])) / count(node_cpu{mode=\"user\"}) * 100", 79 | "interval": "10s", 80 | "intervalFactor": 1, 81 | "legendFormat": "", 82 | "refId": "A", 83 | "step": 10 84 | } 85 | ], 86 | "thresholds": "65, 90", 87 | "title": "CPU Load", 88 | "transparent": false, 89 | "type": "singlestat", 90 | "valueFontSize": "80%", 91 | "valueMaps": [ 92 | { 93 | "op": "=", 94 | "text": "N/A", 95 | "value": "null" 96 | } 97 | ], 98 | "valueName": "avg", 99 | "timeFrom": "10s", 100 | "hideTimeOverride": true 101 | }, 102 | { 103 | "cacheTimeout": null, 104 | "colorBackground": false, 105 | "colorValue": false, 106 | "colors": [ 107 | "rgba(245, 54, 54, 0.9)", 108 | "rgba(237, 129, 40, 0.89)", 109 | "rgba(50, 172, 45, 0.97)" 110 | ], 111 | "datasource": "Prometheus", 112 | "editable": true, 113 | "error": false, 114 | "format": "none", 115 | "gauge": { 116 | "maxValue": 100, 117 | "minValue": 0, 118 | "show": false, 119 | "thresholdLabels": false, 120 | "thresholdMarkers": true 121 | }, 122 | "id": 7, 123 | "interval": null, 124 | "isNew": true, 125 | "links": [], 126 | "mappingType": 1, 127 | "mappingTypes": [ 128 | { 129 | "name": "value to text", 130 | "value": 1 131 | }, 132 | { 133 | "name": "range to text", 134 | "value": 2 135 | } 136 | ], 137 | "maxDataPoints": 100, 138 | "nullPointMode": "connected", 139 | "nullText": null, 140 | "postfix": "", 141 | "postfixFontSize": "50%", 142 | "prefix": "", 143 | "prefixFontSize": "50%", 144 | "rangeMaps": [ 145 | { 146 | "from": "null", 147 | "text": "N/A", 148 | "to": "null" 149 | } 150 | ], 151 | "span": 2, 152 | "sparkline": { 153 | "fillColor": "rgba(31, 118, 189, 0.18)", 154 | "full": false, 155 | "lineColor": "rgb(31, 120, 193)", 156 | "show": false 157 | }, 158 | "targets": [ 159 | { 160 | "expr": "machine_cpu_cores", 161 | "interval": "", 162 | "intervalFactor": 2, 163 | "legendFormat": "", 164 | "metric": "machine_cpu_cores", 165 | "refId": "A", 166 | "step": 20 167 | } 168 | ], 169 | "thresholds": "", 170 | "title": "CPU Cores", 171 | "type": "singlestat", 172 | "valueFontSize": "80%", 173 | "valueMaps": [ 174 | { 175 | "op": "=", 176 | "text": "N/A", 177 | "value": "null" 178 | } 179 | ], 180 | "valueName": "avg" 181 | }, 182 | { 183 | "cacheTimeout": null, 184 | "colorBackground": false, 185 | "colorValue": false, 186 | "colors": [ 187 | "rgba(50, 172, 45, 0.97)", 188 | "rgba(237, 129, 40, 0.89)", 189 | "rgba(245, 54, 54, 0.9)" 190 | ], 191 | "datasource": "Prometheus", 192 | "editable": true, 193 | "error": false, 194 | "format": "percent", 195 | "gauge": { 196 | "maxValue": 100, 197 | "minValue": 0, 198 | "show": true, 199 | "thresholdLabels": false, 200 | "thresholdMarkers": true 201 | }, 202 | "id": 5, 203 | "interval": null, 204 | "isNew": true, 205 | "links": [], 206 | "mappingType": 1, 207 | "mappingTypes": [ 208 | { 209 | "name": "value to text", 210 | "value": 1 211 | }, 212 | { 213 | "name": "range to text", 214 | "value": 2 215 | } 216 | ], 217 | "maxDataPoints": 100, 218 | "nullPointMode": "connected", 219 | "nullText": null, 220 | "postfix": "", 221 | "postfixFontSize": "50%", 222 | "prefix": "", 223 | "prefixFontSize": "50%", 224 | "rangeMaps": [ 225 | { 226 | "from": "null", 227 | "text": "N/A", 228 | "to": "null" 229 | } 230 | ], 231 | "span": 2, 232 | "sparkline": { 233 | "fillColor": "rgba(31, 118, 189, 0.18)", 234 | "full": false, 235 | "lineColor": "rgb(31, 120, 193)", 236 | "show": false 237 | }, 238 | "targets": [ 239 | { 240 | "expr": "(sum(node_memory_MemTotal) - sum(node_memory_MemFree+node_memory_Buffers+node_memory_Cached) ) / sum(node_memory_MemTotal) * 100", 241 | "interval": "10s", 242 | "intervalFactor": 2, 243 | "legendFormat": "", 244 | "refId": "A", 245 | "step": 20 246 | } 247 | ], 248 | "thresholds": "65, 90", 249 | "title": "Memory Load", 250 | "transparent": false, 251 | "type": "singlestat", 252 | "valueFontSize": "80%", 253 | "valueMaps": [ 254 | { 255 | "op": "=", 256 | "text": "N/A", 257 | "value": "null" 258 | } 259 | ], 260 | "valueName": "avg", 261 | "timeFrom": "10s", 262 | "hideTimeOverride": true 263 | }, 264 | { 265 | "cacheTimeout": null, 266 | "colorBackground": false, 267 | "colorValue": false, 268 | "colors": [ 269 | "rgba(245, 54, 54, 0.9)", 270 | "rgba(237, 129, 40, 0.89)", 271 | "rgba(50, 172, 45, 0.97)" 272 | ], 273 | "datasource": "Prometheus", 274 | "decimals": 2, 275 | "editable": true, 276 | "error": false, 277 | "format": "bytes", 278 | "gauge": { 279 | "maxValue": 100, 280 | "minValue": 0, 281 | "show": false, 282 | "thresholdLabels": false, 283 | "thresholdMarkers": true 284 | }, 285 | "id": 2, 286 | "interval": null, 287 | "isNew": true, 288 | "links": [], 289 | "mappingType": 1, 290 | "mappingTypes": [ 291 | { 292 | "name": "value to text", 293 | "value": 1 294 | }, 295 | { 296 | "name": "range to text", 297 | "value": 2 298 | } 299 | ], 300 | "maxDataPoints": 100, 301 | "nullPointMode": "connected", 302 | "nullText": null, 303 | "postfix": "", 304 | "postfixFontSize": "50%", 305 | "prefix": "", 306 | "prefixFontSize": "50%", 307 | "rangeMaps": [ 308 | { 309 | "from": "null", 310 | "text": "N/A", 311 | "to": "null" 312 | } 313 | ], 314 | "span": 2, 315 | "sparkline": { 316 | "fillColor": "rgba(31, 118, 189, 0.18)", 317 | "full": false, 318 | "lineColor": "rgb(31, 120, 193)", 319 | "show": false 320 | }, 321 | "targets": [ 322 | { 323 | "expr": "sum(container_memory_usage_bytes{image!=\"\"})", 324 | "interval": "10s", 325 | "intervalFactor": 2, 326 | "legendFormat": "", 327 | "refId": "A", 328 | "step": 20 329 | } 330 | ], 331 | "thresholds": "", 332 | "timeFrom": "10s", 333 | "title": "Used Memory", 334 | "transparent": false, 335 | "type": "singlestat", 336 | "valueFontSize": "80%", 337 | "valueMaps": [ 338 | { 339 | "op": "=", 340 | "text": "N/A", 341 | "value": "null" 342 | } 343 | ], 344 | "valueName": "avg", 345 | "hideTimeOverride": true 346 | }, 347 | { 348 | "cacheTimeout": null, 349 | "colorBackground": false, 350 | "colorValue": false, 351 | "colors": [ 352 | "rgba(50, 172, 45, 0.97)", 353 | "rgba(237, 129, 40, 0.89)", 354 | "rgba(245, 54, 54, 0.9)" 355 | ], 356 | "datasource": "Prometheus", 357 | "decimals": null, 358 | "editable": true, 359 | "error": false, 360 | "format": "percent", 361 | "gauge": { 362 | "maxValue": 100, 363 | "minValue": 0, 364 | "show": true, 365 | "thresholdLabels": false, 366 | "thresholdMarkers": true 367 | }, 368 | "id": 6, 369 | "interval": null, 370 | "isNew": true, 371 | "links": [], 372 | "mappingType": 1, 373 | "mappingTypes": [ 374 | { 375 | "name": "value to text", 376 | "value": 1 377 | }, 378 | { 379 | "name": "range to text", 380 | "value": 2 381 | } 382 | ], 383 | "maxDataPoints": 100, 384 | "nullPointMode": "connected", 385 | "nullText": null, 386 | "postfix": "", 387 | "postfixFontSize": "50%", 388 | "prefix": "", 389 | "prefixFontSize": "50%", 390 | "rangeMaps": [ 391 | { 392 | "from": "null", 393 | "text": "N/A", 394 | "to": "null" 395 | } 396 | ], 397 | "span": 2, 398 | "sparkline": { 399 | "fillColor": "rgba(31, 118, 189, 0.18)", 400 | "full": false, 401 | "lineColor": "rgb(31, 120, 193)", 402 | "show": false 403 | }, 404 | "targets": [ 405 | { 406 | "expr": "(node_filesystem_size{fstype=\"aufs\"} - node_filesystem_free{fstype=\"aufs\"}) / node_filesystem_size{fstype=\"aufs\"} * 100", 407 | "interval": "30s", 408 | "intervalFactor": 1, 409 | "legendFormat": "", 410 | "refId": "A", 411 | "step": 30 412 | } 413 | ], 414 | "thresholds": "65, 90", 415 | "title": "Storage Load", 416 | "transparent": false, 417 | "type": "singlestat", 418 | "valueFontSize": "80%", 419 | "valueMaps": [ 420 | { 421 | "op": "=", 422 | "text": "N/A", 423 | "value": "null" 424 | } 425 | ], 426 | "valueName": "avg", 427 | "timeFrom": "10s", 428 | "hideTimeOverride": true 429 | }, 430 | { 431 | "cacheTimeout": null, 432 | "colorBackground": false, 433 | "colorValue": false, 434 | "colors": [ 435 | "rgba(245, 54, 54, 0.9)", 436 | "rgba(237, 129, 40, 0.89)", 437 | "rgba(50, 172, 45, 0.97)" 438 | ], 439 | "datasource": "Prometheus", 440 | "decimals": 2, 441 | "editable": true, 442 | "error": false, 443 | "format": "bytes", 444 | "gauge": { 445 | "maxValue": 100, 446 | "minValue": 0, 447 | "show": false, 448 | "thresholdLabels": false, 449 | "thresholdMarkers": true 450 | }, 451 | "id": 3, 452 | "interval": null, 453 | "isNew": true, 454 | "links": [], 455 | "mappingType": 1, 456 | "mappingTypes": [ 457 | { 458 | "name": "value to text", 459 | "value": 1 460 | }, 461 | { 462 | "name": "range to text", 463 | "value": 2 464 | } 465 | ], 466 | "maxDataPoints": 100, 467 | "nullPointMode": "connected", 468 | "nullText": null, 469 | "postfix": "", 470 | "postfixFontSize": "50%", 471 | "prefix": "", 472 | "prefixFontSize": "50%", 473 | "rangeMaps": [ 474 | { 475 | "from": "null", 476 | "text": "N/A", 477 | "to": "null" 478 | } 479 | ], 480 | "span": 2, 481 | "sparkline": { 482 | "fillColor": "rgba(31, 118, 189, 0.18)", 483 | "full": false, 484 | "lineColor": "rgb(31, 120, 193)", 485 | "show": false 486 | }, 487 | "targets": [ 488 | { 489 | "expr": "sum(container_fs_usage_bytes)", 490 | "interval": "30s", 491 | "intervalFactor": 2, 492 | "refId": "A", 493 | "step": 60 494 | } 495 | ], 496 | "thresholds": "", 497 | "title": "Used Storage", 498 | "transparent": false, 499 | "type": "singlestat", 500 | "valueFontSize": "80%", 501 | "valueMaps": [ 502 | { 503 | "op": "=", 504 | "text": "N/A", 505 | "value": "null" 506 | } 507 | ], 508 | "valueName": "avg", 509 | "timeFrom": "10s", 510 | "hideTimeOverride": true 511 | } 512 | ], 513 | "title": "Overview" 514 | }, 515 | { 516 | "collapse": false, 517 | "editable": true, 518 | "height": "150px", 519 | "panels": [ 520 | { 521 | "aliasColors": {}, 522 | "bars": true, 523 | "datasource": "Prometheus", 524 | "decimals": 0, 525 | "editable": true, 526 | "error": false, 527 | "fill": 1, 528 | "grid": { 529 | "threshold1": null, 530 | "threshold1Color": "rgba(216, 200, 27, 0.27)", 531 | "threshold2": null, 532 | "threshold2Color": "rgba(234, 112, 112, 0.22)", 533 | "thresholdLine": false 534 | }, 535 | "id": 9, 536 | "isNew": true, 537 | "legend": { 538 | "avg": false, 539 | "current": false, 540 | "max": false, 541 | "min": false, 542 | "show": false, 543 | "total": false, 544 | "values": false 545 | }, 546 | "lines": false, 547 | "linewidth": 2, 548 | "links": [], 549 | "nullPointMode": "connected", 550 | "percentage": false, 551 | "pointradius": 5, 552 | "points": false, 553 | "renderer": "flot", 554 | "seriesOverrides": [], 555 | "span": 4, 556 | "stack": false, 557 | "steppedLine": false, 558 | "targets": [ 559 | { 560 | "expr": "scalar(count(container_memory_usage_bytes{image!=\"\"}) > 0)", 561 | "interval": "", 562 | "intervalFactor": 2, 563 | "legendFormat": "containers", 564 | "refId": "A", 565 | "step": 2 566 | } 567 | ], 568 | "timeFrom": null, 569 | "timeShift": null, 570 | "title": "Running Containers", 571 | "tooltip": { 572 | "msResolution": true, 573 | "shared": true, 574 | "sort": 0, 575 | "value_type": "cumulative" 576 | }, 577 | "type": "graph", 578 | "xaxis": { 579 | "show": true 580 | }, 581 | "yaxes": [ 582 | { 583 | "format": "none", 584 | "label": "", 585 | "logBase": 1, 586 | "max": null, 587 | "min": 0, 588 | "show": true 589 | }, 590 | { 591 | "format": "short", 592 | "label": null, 593 | "logBase": 1, 594 | "max": null, 595 | "min": null, 596 | "show": false 597 | } 598 | ] 599 | }, 600 | { 601 | "aliasColors": {}, 602 | "bars": true, 603 | "datasource": "Prometheus", 604 | "decimals": 2, 605 | "editable": true, 606 | "error": false, 607 | "fill": 1, 608 | "grid": { 609 | "threshold1": null, 610 | "threshold1Color": "rgba(216, 200, 27, 0.27)", 611 | "threshold2": null, 612 | "threshold2Color": "rgba(234, 112, 112, 0.22)" 613 | }, 614 | "id": 10, 615 | "isNew": true, 616 | "legend": { 617 | "avg": false, 618 | "current": false, 619 | "max": false, 620 | "min": false, 621 | "show": false, 622 | "total": false, 623 | "values": false 624 | }, 625 | "lines": false, 626 | "linewidth": 2, 627 | "links": [], 628 | "nullPointMode": "connected", 629 | "percentage": false, 630 | "pointradius": 5, 631 | "points": false, 632 | "renderer": "flot", 633 | "seriesOverrides": [ 634 | { 635 | "alias": "load 1m", 636 | "color": "#BF1B00" 637 | } 638 | ], 639 | "span": 4, 640 | "stack": false, 641 | "steppedLine": false, 642 | "targets": [ 643 | { 644 | "expr": "node_load1", 645 | "interval": "", 646 | "intervalFactor": 2, 647 | "legendFormat": "load 1m", 648 | "metric": "node_load1", 649 | "refId": "A", 650 | "step": 2 651 | } 652 | ], 653 | "timeFrom": null, 654 | "timeShift": null, 655 | "title": "System Load", 656 | "tooltip": { 657 | "msResolution": true, 658 | "shared": true, 659 | "sort": 0, 660 | "value_type": "cumulative" 661 | }, 662 | "type": "graph", 663 | "xaxis": { 664 | "show": true 665 | }, 666 | "yaxes": [ 667 | { 668 | "format": "short", 669 | "label": null, 670 | "logBase": 1, 671 | "max": null, 672 | "min": 0, 673 | "show": true 674 | }, 675 | { 676 | "format": "short", 677 | "label": null, 678 | "logBase": 1, 679 | "max": null, 680 | "min": null, 681 | "show": false 682 | } 683 | ] 684 | }, 685 | { 686 | "aliasColors": {}, 687 | "bars": false, 688 | "datasource": "Prometheus", 689 | "editable": true, 690 | "error": false, 691 | "fill": 1, 692 | "grid": { 693 | "threshold1": null, 694 | "threshold1Color": "rgba(216, 200, 27, 0.27)", 695 | "threshold2": null, 696 | "threshold2Color": "rgba(234, 112, 112, 0.22)" 697 | }, 698 | "id": 15, 699 | "isNew": true, 700 | "legend": { 701 | "alignAsTable": true, 702 | "avg": true, 703 | "current": false, 704 | "max": true, 705 | "min": true, 706 | "rightSide": true, 707 | "show": false, 708 | "total": false, 709 | "values": true 710 | }, 711 | "lines": true, 712 | "linewidth": 2, 713 | "links": [], 714 | "nullPointMode": "connected", 715 | "percentage": false, 716 | "pointradius": 5, 717 | "points": false, 718 | "renderer": "flot", 719 | "seriesOverrides": [ 720 | { 721 | "alias": "read", 722 | "yaxis": 1 723 | }, 724 | { 725 | "alias": "written", 726 | "yaxis": 1 727 | }, 728 | { 729 | "alias": "io time", 730 | "yaxis": 2 731 | } 732 | ], 733 | "span": 4, 734 | "stack": false, 735 | "steppedLine": false, 736 | "targets": [ 737 | { 738 | "expr": "sum(irate(node_disk_bytes_read[5m]))", 739 | "interval": "2s", 740 | "intervalFactor": 4, 741 | "legendFormat": "read", 742 | "metric": "", 743 | "refId": "A", 744 | "step": 8 745 | }, 746 | { 747 | "expr": "sum(irate(node_disk_bytes_written[5m]))", 748 | "interval": "2s", 749 | "intervalFactor": 4, 750 | "legendFormat": "written", 751 | "metric": "", 752 | "refId": "B", 753 | "step": 8 754 | }, 755 | { 756 | "expr": "sum(irate(node_disk_io_time_ms[5m]))", 757 | "interval": "2s", 758 | "intervalFactor": 4, 759 | "legendFormat": "io time", 760 | "metric": "", 761 | "refId": "C", 762 | "step": 8 763 | } 764 | ], 765 | "timeFrom": null, 766 | "timeShift": null, 767 | "title": "I/O Usage", 768 | "tooltip": { 769 | "msResolution": true, 770 | "shared": true, 771 | "sort": 0, 772 | "value_type": "cumulative" 773 | }, 774 | "type": "graph", 775 | "xaxis": { 776 | "show": true 777 | }, 778 | "yaxes": [ 779 | { 780 | "format": "bytes", 781 | "label": null, 782 | "logBase": 1, 783 | "max": null, 784 | "min": null, 785 | "show": true 786 | }, 787 | { 788 | "format": "ms", 789 | "label": null, 790 | "logBase": 1, 791 | "max": null, 792 | "min": null, 793 | "show": true 794 | } 795 | ] 796 | } 797 | ], 798 | "title": "Host stats" 799 | }, 800 | { 801 | "collapse": false, 802 | "editable": true, 803 | "height": "250px", 804 | "panels": [ 805 | { 806 | "aliasColors": {}, 807 | "bars": false, 808 | "datasource": "Prometheus", 809 | "decimals": 2, 810 | "editable": true, 811 | "error": false, 812 | "fill": 1, 813 | "grid": { 814 | "threshold1": null, 815 | "threshold1Color": "rgba(216, 200, 27, 0.27)", 816 | "threshold2": null, 817 | "threshold2Color": "rgba(234, 112, 112, 0.22)" 818 | }, 819 | "id": 8, 820 | "isNew": true, 821 | "legend": { 822 | "alignAsTable": true, 823 | "avg": true, 824 | "current": false, 825 | "max": true, 826 | "min": true, 827 | "rightSide": true, 828 | "show": true, 829 | "total": false, 830 | "values": true 831 | }, 832 | "lines": true, 833 | "linewidth": 2, 834 | "links": [], 835 | "nullPointMode": "connected", 836 | "percentage": false, 837 | "pointradius": 5, 838 | "points": false, 839 | "renderer": "flot", 840 | "seriesOverrides": [], 841 | "span": 12, 842 | "stack": false, 843 | "steppedLine": false, 844 | "targets": [ 845 | { 846 | "expr": "sum by (name) (rate(container_cpu_usage_seconds_total{image!=\"\",container_label_org_label_schema_group=\"\"}[1m])) / scalar(count(node_cpu{mode=\"user\"})) * 100", 847 | "intervalFactor": 10, 848 | "legendFormat": "{{ name }}", 849 | "metric": "container_cpu_user_seconds_total", 850 | "refId": "A", 851 | "step": 10 852 | } 853 | ], 854 | "timeFrom": null, 855 | "timeShift": null, 856 | "title": "Container CPU Usage", 857 | "tooltip": { 858 | "msResolution": true, 859 | "shared": true, 860 | "sort": 2, 861 | "value_type": "cumulative" 862 | }, 863 | "type": "graph", 864 | "xaxis": { 865 | "show": true 866 | }, 867 | "yaxes": [ 868 | { 869 | "format": "percent", 870 | "label": null, 871 | "logBase": 1, 872 | "max": null, 873 | "min": 0, 874 | "show": true 875 | }, 876 | { 877 | "format": "short", 878 | "label": null, 879 | "logBase": 1, 880 | "max": null, 881 | "min": null, 882 | "show": false 883 | } 884 | ] 885 | } 886 | ], 887 | "title": "CPU" 888 | }, 889 | { 890 | "collapse": false, 891 | "editable": true, 892 | "height": "250px", 893 | "panels": [ 894 | { 895 | "aliasColors": {}, 896 | "bars": false, 897 | "datasource": "Prometheus", 898 | "decimals": 2, 899 | "editable": true, 900 | "error": false, 901 | "fill": 1, 902 | "grid": { 903 | "threshold1": null, 904 | "threshold1Color": "rgba(216, 200, 27, 0.27)", 905 | "threshold2": null, 906 | "threshold2Color": "rgba(234, 112, 112, 0.22)" 907 | }, 908 | "id": 11, 909 | "isNew": true, 910 | "legend": { 911 | "alignAsTable": true, 912 | "avg": true, 913 | "current": false, 914 | "max": true, 915 | "min": true, 916 | "rightSide": true, 917 | "show": true, 918 | "total": false, 919 | "values": true 920 | }, 921 | "lines": true, 922 | "linewidth": 2, 923 | "links": [], 924 | "nullPointMode": "connected", 925 | "percentage": false, 926 | "pointradius": 5, 927 | "points": false, 928 | "renderer": "flot", 929 | "seriesOverrides": [], 930 | "span": 12, 931 | "stack": false, 932 | "steppedLine": false, 933 | "targets": [ 934 | { 935 | "expr": "sum by (name)(container_memory_usage_bytes{image!=\"\",container_label_org_label_schema_group=\"\"})", 936 | "intervalFactor": 1, 937 | "legendFormat": "{{ name }}", 938 | "metric": "container_memory_usage", 939 | "refId": "A", 940 | "step": 1 941 | } 942 | ], 943 | "timeFrom": null, 944 | "timeShift": null, 945 | "title": "Container Memory Usage", 946 | "tooltip": { 947 | "msResolution": true, 948 | "shared": true, 949 | "sort": 0, 950 | "value_type": "cumulative" 951 | }, 952 | "type": "graph", 953 | "xaxis": { 954 | "show": true 955 | }, 956 | "yaxes": [ 957 | { 958 | "format": "bytes", 959 | "label": null, 960 | "logBase": 1, 961 | "max": null, 962 | "min": 0, 963 | "show": true 964 | }, 965 | { 966 | "format": "short", 967 | "label": null, 968 | "logBase": 1, 969 | "max": null, 970 | "min": null, 971 | "show": false 972 | } 973 | ] 974 | }, 975 | { 976 | "aliasColors": {}, 977 | "bars": false, 978 | "datasource": "Prometheus", 979 | "decimals": 2, 980 | "editable": true, 981 | "error": false, 982 | "fill": 1, 983 | "grid": { 984 | "threshold1": null, 985 | "threshold1Color": "rgba(216, 200, 27, 0.27)", 986 | "threshold2": null, 987 | "threshold2Color": "rgba(234, 112, 112, 0.22)" 988 | }, 989 | "id": 12, 990 | "isNew": true, 991 | "legend": { 992 | "alignAsTable": true, 993 | "avg": true, 994 | "current": false, 995 | "max": true, 996 | "min": true, 997 | "rightSide": true, 998 | "show": true, 999 | "total": false, 1000 | "values": true 1001 | }, 1002 | "lines": true, 1003 | "linewidth": 2, 1004 | "links": [], 1005 | "nullPointMode": "connected", 1006 | "percentage": false, 1007 | "pointradius": 5, 1008 | "points": false, 1009 | "renderer": "flot", 1010 | "seriesOverrides": [], 1011 | "span": 12, 1012 | "stack": false, 1013 | "steppedLine": false, 1014 | "targets": [ 1015 | { 1016 | "expr": "sum by (name) (container_memory_cache{image!=\"\",container_label_org_label_schema_group=\"\"})", 1017 | "intervalFactor": 2, 1018 | "legendFormat": "{{name}}", 1019 | "metric": "container_memory_cache", 1020 | "refId": "A", 1021 | "step": 2 1022 | } 1023 | ], 1024 | "timeFrom": null, 1025 | "timeShift": null, 1026 | "title": "Container Cached Memory Usage", 1027 | "tooltip": { 1028 | "msResolution": true, 1029 | "shared": true, 1030 | "sort": 0, 1031 | "value_type": "cumulative" 1032 | }, 1033 | "type": "graph", 1034 | "xaxis": { 1035 | "show": true 1036 | }, 1037 | "yaxes": [ 1038 | { 1039 | "format": "bytes", 1040 | "label": null, 1041 | "logBase": 1, 1042 | "max": null, 1043 | "min": 0, 1044 | "show": true 1045 | }, 1046 | { 1047 | "format": "short", 1048 | "label": null, 1049 | "logBase": 1, 1050 | "max": null, 1051 | "min": null, 1052 | "show": false 1053 | } 1054 | ] 1055 | } 1056 | ], 1057 | "title": "Memory" 1058 | }, 1059 | { 1060 | "collapse": false, 1061 | "editable": true, 1062 | "height": "250px", 1063 | "panels": [ 1064 | { 1065 | "aliasColors": {}, 1066 | "bars": false, 1067 | "datasource": "Prometheus", 1068 | "decimals": 2, 1069 | "editable": true, 1070 | "error": false, 1071 | "fill": 1, 1072 | "grid": { 1073 | "threshold1": null, 1074 | "threshold1Color": "rgba(216, 200, 27, 0.27)", 1075 | "threshold2": null, 1076 | "threshold2Color": "rgba(234, 112, 112, 0.22)" 1077 | }, 1078 | "id": 13, 1079 | "isNew": true, 1080 | "legend": { 1081 | "alignAsTable": true, 1082 | "avg": true, 1083 | "current": false, 1084 | "max": true, 1085 | "min": true, 1086 | "rightSide": true, 1087 | "show": true, 1088 | "total": false, 1089 | "values": true 1090 | }, 1091 | "lines": true, 1092 | "linewidth": 2, 1093 | "links": [], 1094 | "nullPointMode": "connected", 1095 | "percentage": false, 1096 | "pointradius": 5, 1097 | "points": false, 1098 | "renderer": "flot", 1099 | "seriesOverrides": [], 1100 | "span": 12, 1101 | "stack": false, 1102 | "steppedLine": false, 1103 | "targets": [ 1104 | { 1105 | "expr": "sum by (name) (rate(container_network_receive_bytes_total{image!=\"\",container_label_org_label_schema_group=\"\"}[1m]))", 1106 | "intervalFactor": 10, 1107 | "legendFormat": "{{ name }}", 1108 | "metric": "container_network_receive_bytes_total", 1109 | "refId": "A", 1110 | "step": 10 1111 | } 1112 | ], 1113 | "timeFrom": null, 1114 | "timeShift": null, 1115 | "title": "Container Network Input", 1116 | "tooltip": { 1117 | "msResolution": true, 1118 | "shared": true, 1119 | "sort": 2, 1120 | "value_type": "cumulative" 1121 | }, 1122 | "type": "graph", 1123 | "xaxis": { 1124 | "show": true 1125 | }, 1126 | "yaxes": [ 1127 | { 1128 | "format": "bytes", 1129 | "label": null, 1130 | "logBase": 1, 1131 | "max": null, 1132 | "min": 0, 1133 | "show": true 1134 | }, 1135 | { 1136 | "format": "short", 1137 | "label": null, 1138 | "logBase": 1, 1139 | "max": null, 1140 | "min": null, 1141 | "show": false 1142 | } 1143 | ] 1144 | }, 1145 | { 1146 | "aliasColors": {}, 1147 | "bars": false, 1148 | "datasource": "Prometheus", 1149 | "decimals": 2, 1150 | "editable": true, 1151 | "error": false, 1152 | "fill": 1, 1153 | "grid": { 1154 | "threshold1": null, 1155 | "threshold1Color": "rgba(216, 200, 27, 0.27)", 1156 | "threshold2": null, 1157 | "threshold2Color": "rgba(234, 112, 112, 0.22)" 1158 | }, 1159 | "id": 14, 1160 | "isNew": true, 1161 | "legend": { 1162 | "alignAsTable": true, 1163 | "avg": true, 1164 | "current": false, 1165 | "max": true, 1166 | "min": true, 1167 | "rightSide": true, 1168 | "show": true, 1169 | "total": false, 1170 | "values": true 1171 | }, 1172 | "lines": true, 1173 | "linewidth": 2, 1174 | "links": [], 1175 | "nullPointMode": "connected", 1176 | "percentage": false, 1177 | "pointradius": 5, 1178 | "points": false, 1179 | "renderer": "flot", 1180 | "seriesOverrides": [], 1181 | "span": 12, 1182 | "stack": false, 1183 | "steppedLine": false, 1184 | "targets": [ 1185 | { 1186 | "expr": "sum by (name) (rate(container_network_transmit_bytes_total{image!=\"\",container_label_org_label_schema_group=\"\"}[1m]))", 1187 | "intervalFactor": 10, 1188 | "legendFormat": "{{ name }}", 1189 | "metric": "container_network_transmit_bytes_total", 1190 | "refId": "A", 1191 | "step": 10 1192 | } 1193 | ], 1194 | "timeFrom": null, 1195 | "timeShift": null, 1196 | "title": "Container Network Output", 1197 | "tooltip": { 1198 | "msResolution": true, 1199 | "shared": true, 1200 | "sort": 2, 1201 | "value_type": "cumulative" 1202 | }, 1203 | "type": "graph", 1204 | "xaxis": { 1205 | "show": true 1206 | }, 1207 | "yaxes": [ 1208 | { 1209 | "format": "bytes", 1210 | "label": null, 1211 | "logBase": 1, 1212 | "max": null, 1213 | "min": 0, 1214 | "show": true 1215 | }, 1216 | { 1217 | "format": "short", 1218 | "label": null, 1219 | "logBase": 1, 1220 | "max": null, 1221 | "min": null, 1222 | "show": false 1223 | } 1224 | ] 1225 | } 1226 | ], 1227 | "title": "Network" 1228 | } 1229 | ], 1230 | "time": { 1231 | "from": "now-15m", 1232 | "to": "now" 1233 | }, 1234 | "timepicker": { 1235 | "refresh_intervals": [ 1236 | "5s", 1237 | "10s", 1238 | "30s", 1239 | "1m", 1240 | "5m", 1241 | "15m", 1242 | "30m", 1243 | "1h", 1244 | "2h", 1245 | "1d" 1246 | ], 1247 | "time_options": [ 1248 | "5m", 1249 | "15m", 1250 | "1h", 1251 | "6h", 1252 | "12h", 1253 | "24h", 1254 | "2d", 1255 | "7d", 1256 | "30d" 1257 | ] 1258 | }, 1259 | "templating": { 1260 | "list": [] 1261 | }, 1262 | "annotations": { 1263 | "list": [] 1264 | }, 1265 | "refresh": "10s", 1266 | "schemaVersion": 12, 1267 | "version": 8, 1268 | "links": [], 1269 | "gnetId": null 1270 | } 1271 | -------------------------------------------------------------------------------- /grafana/dashboards/monitor_services.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": null, 3 | "title": "Monitor Services", 4 | "tags": [ 5 | "prometheus" 6 | ], 7 | "style": "dark", 8 | "timezone": "browser", 9 | "editable": true, 10 | "hideControls": false, 11 | "sharedCrosshair": true, 12 | "rows": [ 13 | { 14 | "collapse": false, 15 | "editable": true, 16 | "height": "100px", 17 | "panels": [ 18 | { 19 | "cacheTimeout": null, 20 | "colorBackground": false, 21 | "colorValue": false, 22 | "colors": [ 23 | "rgba(245, 54, 54, 0.9)", 24 | "rgba(237, 129, 40, 0.89)", 25 | "rgba(50, 172, 45, 0.97)" 26 | ], 27 | "datasource": "Prometheus", 28 | "decimals": 1, 29 | "editable": true, 30 | "error": false, 31 | "format": "s", 32 | "gauge": { 33 | "maxValue": 100, 34 | "minValue": 0, 35 | "show": false, 36 | "thresholdLabels": false, 37 | "thresholdMarkers": true 38 | }, 39 | "hideTimeOverride": true, 40 | "id": 1, 41 | "interval": null, 42 | "isNew": true, 43 | "links": [], 44 | "mappingType": 1, 45 | "mappingTypes": [ 46 | { 47 | "name": "value to text", 48 | "value": 1 49 | }, 50 | { 51 | "name": "range to text", 52 | "value": 2 53 | } 54 | ], 55 | "maxDataPoints": 100, 56 | "nullPointMode": "connected", 57 | "nullText": null, 58 | "postfix": "s", 59 | "postfixFontSize": "80%", 60 | "prefix": "", 61 | "prefixFontSize": "50%", 62 | "rangeMaps": [ 63 | { 64 | "from": "null", 65 | "text": "N/A", 66 | "to": "null" 67 | } 68 | ], 69 | "span": 3, 70 | "sparkline": { 71 | "fillColor": "rgba(31, 118, 189, 0.18)", 72 | "full": false, 73 | "lineColor": "rgb(31, 120, 193)", 74 | "show": false 75 | }, 76 | "targets": [ 77 | { 78 | "expr": "(time() - process_start_time_seconds{instance=\"localhost:9090\",job=\"prometheus\"})", 79 | "interval": "10s", 80 | "intervalFactor": 1, 81 | "legendFormat": "", 82 | "refId": "A", 83 | "step": 10 84 | } 85 | ], 86 | "thresholds": "", 87 | "timeFrom": "10s", 88 | "timeShift": null, 89 | "title": "Prometheus Uptime", 90 | "type": "singlestat", 91 | "valueFontSize": "80%", 92 | "valueMaps": [ 93 | { 94 | "op": "=", 95 | "text": "N/A", 96 | "value": "null" 97 | } 98 | ], 99 | "valueName": "avg" 100 | }, 101 | { 102 | "cacheTimeout": null, 103 | "colorBackground": false, 104 | "colorValue": false, 105 | "colors": [ 106 | "rgba(245, 54, 54, 0.9)", 107 | "rgba(237, 129, 40, 0.89)", 108 | "rgba(50, 172, 45, 0.97)" 109 | ], 110 | "datasource": "Prometheus", 111 | "decimals": 2, 112 | "editable": true, 113 | "error": false, 114 | "format": "bytes", 115 | "gauge": { 116 | "maxValue": 100, 117 | "minValue": 0, 118 | "show": false, 119 | "thresholdLabels": false, 120 | "thresholdMarkers": true 121 | }, 122 | "hideTimeOverride": true, 123 | "id": 5, 124 | "interval": null, 125 | "isNew": true, 126 | "links": [], 127 | "mappingType": 1, 128 | "mappingTypes": [ 129 | { 130 | "name": "value to text", 131 | "value": 1 132 | }, 133 | { 134 | "name": "range to text", 135 | "value": 2 136 | } 137 | ], 138 | "maxDataPoints": 100, 139 | "nullPointMode": "connected", 140 | "nullText": null, 141 | "postfix": "", 142 | "postfixFontSize": "50%", 143 | "prefix": "", 144 | "prefixFontSize": "50%", 145 | "rangeMaps": [ 146 | { 147 | "from": "null", 148 | "text": "N/A", 149 | "to": "null" 150 | } 151 | ], 152 | "span": 3, 153 | "sparkline": { 154 | "fillColor": "rgba(31, 118, 189, 0.18)", 155 | "full": false, 156 | "lineColor": "rgb(31, 120, 193)", 157 | "show": false 158 | }, 159 | "targets": [ 160 | { 161 | "expr": "sum(container_memory_usage_bytes{container_label_org_label_schema_group=\"monitoring\"})", 162 | "interval": "10s", 163 | "intervalFactor": 1, 164 | "legendFormat": "", 165 | "refId": "A", 166 | "step": 10 167 | } 168 | ], 169 | "thresholds": "", 170 | "timeFrom": "10s", 171 | "timeShift": null, 172 | "title": "Memory Usage", 173 | "type": "singlestat", 174 | "valueFontSize": "80%", 175 | "valueMaps": [ 176 | { 177 | "op": "=", 178 | "text": "N/A", 179 | "value": "null" 180 | } 181 | ], 182 | "valueName": "avg" 183 | }, 184 | { 185 | "cacheTimeout": null, 186 | "colorBackground": false, 187 | "colorValue": false, 188 | "colors": [ 189 | "rgba(245, 54, 54, 0.9)", 190 | "rgba(237, 129, 40, 0.89)", 191 | "rgba(50, 172, 45, 0.97)" 192 | ], 193 | "datasource": "Prometheus", 194 | "editable": true, 195 | "error": false, 196 | "format": "none", 197 | "gauge": { 198 | "maxValue": 100, 199 | "minValue": 0, 200 | "show": false, 201 | "thresholdLabels": false, 202 | "thresholdMarkers": true 203 | }, 204 | "hideTimeOverride": true, 205 | "id": 3, 206 | "interval": null, 207 | "isNew": true, 208 | "links": [], 209 | "mappingType": 1, 210 | "mappingTypes": [ 211 | { 212 | "name": "value to text", 213 | "value": 1 214 | }, 215 | { 216 | "name": "range to text", 217 | "value": 2 218 | } 219 | ], 220 | "maxDataPoints": 100, 221 | "nullPointMode": "connected", 222 | "nullText": null, 223 | "postfix": "", 224 | "postfixFontSize": "50%", 225 | "prefix": "", 226 | "prefixFontSize": "50%", 227 | "rangeMaps": [ 228 | { 229 | "from": "null", 230 | "text": "N/A", 231 | "to": "null" 232 | } 233 | ], 234 | "span": 3, 235 | "sparkline": { 236 | "fillColor": "rgba(31, 118, 189, 0.18)", 237 | "full": false, 238 | "lineColor": "rgb(31, 120, 193)", 239 | "show": false 240 | }, 241 | "targets": [ 242 | { 243 | "expr": "prometheus_tsdb_head_chunks", 244 | "interval": "10s", 245 | "intervalFactor": 1, 246 | "refId": "A", 247 | "step": 10 248 | } 249 | ], 250 | "thresholds": "", 251 | "timeFrom": "10s", 252 | "timeShift": null, 253 | "title": "In-Memory Chunks", 254 | "type": "singlestat", 255 | "valueFontSize": "80%", 256 | "valueMaps": [ 257 | { 258 | "op": "=", 259 | "text": "N/A", 260 | "value": "null" 261 | } 262 | ], 263 | "valueName": "avg" 264 | }, 265 | { 266 | "cacheTimeout": null, 267 | "colorBackground": false, 268 | "colorValue": false, 269 | "colors": [ 270 | "rgba(245, 54, 54, 0.9)", 271 | "rgba(237, 129, 40, 0.89)", 272 | "rgba(50, 172, 45, 0.97)" 273 | ], 274 | "datasource": "Prometheus", 275 | "editable": true, 276 | "error": false, 277 | "format": "none", 278 | "gauge": { 279 | "maxValue": 100, 280 | "minValue": 0, 281 | "show": false, 282 | "thresholdLabels": false, 283 | "thresholdMarkers": true 284 | }, 285 | "hideTimeOverride": true, 286 | "id": 2, 287 | "interval": null, 288 | "isNew": true, 289 | "links": [], 290 | "mappingType": 1, 291 | "mappingTypes": [ 292 | { 293 | "name": "value to text", 294 | "value": 1 295 | }, 296 | { 297 | "name": "range to text", 298 | "value": 2 299 | } 300 | ], 301 | "maxDataPoints": 100, 302 | "nullPointMode": "connected", 303 | "nullText": null, 304 | "postfix": "", 305 | "postfixFontSize": "50%", 306 | "prefix": "", 307 | "prefixFontSize": "50%", 308 | "rangeMaps": [ 309 | { 310 | "from": "null", 311 | "text": "N/A", 312 | "to": "null" 313 | } 314 | ], 315 | "span": 3, 316 | "sparkline": { 317 | "fillColor": "rgba(31, 118, 189, 0.18)", 318 | "full": false, 319 | "lineColor": "rgb(31, 120, 193)", 320 | "show": false 321 | }, 322 | "targets": [ 323 | { 324 | "expr": "prometheus_tsdb_head_series", 325 | "interval": "10s", 326 | "intervalFactor": 1, 327 | "refId": "A", 328 | "step": 10 329 | } 330 | ], 331 | "thresholds": "", 332 | "timeFrom": "10s", 333 | "timeShift": null, 334 | "title": "In-Memory Series", 335 | "type": "singlestat", 336 | "valueFontSize": "80%", 337 | "valueMaps": [ 338 | { 339 | "op": "=", 340 | "text": "N/A", 341 | "value": "null" 342 | } 343 | ], 344 | "valueName": "avg" 345 | } 346 | ], 347 | "title": "Overview" 348 | }, 349 | { 350 | "collapse": false, 351 | "editable": true, 352 | "height": "250px", 353 | "panels": [ 354 | { 355 | "aliasColors": {}, 356 | "bars": false, 357 | "datasource": "Prometheus", 358 | "decimals": 2, 359 | "editable": true, 360 | "error": false, 361 | "fill": 1, 362 | "grid": { 363 | "threshold1": null, 364 | "threshold1Color": "rgba(216, 200, 27, 0.27)", 365 | "threshold2": null, 366 | "threshold2Color": "rgba(234, 112, 112, 0.22)" 367 | }, 368 | "id": 6, 369 | "isNew": true, 370 | "legend": { 371 | "alignAsTable": true, 372 | "avg": true, 373 | "current": false, 374 | "max": true, 375 | "min": true, 376 | "rightSide": true, 377 | "show": true, 378 | "total": false, 379 | "values": true 380 | }, 381 | "lines": true, 382 | "linewidth": 2, 383 | "links": [], 384 | "nullPointMode": "connected", 385 | "percentage": false, 386 | "pointradius": 5, 387 | "points": false, 388 | "renderer": "flot", 389 | "seriesOverrides": [], 390 | "span": 12, 391 | "stack": false, 392 | "steppedLine": false, 393 | "targets": [ 394 | { 395 | "expr": "sum(rate(container_cpu_user_seconds_total{container_label_org_label_schema_group=\"monitoring\"}[1m]) * 100 / scalar(count(node_cpu{mode=\"user\"}))) by (name)", 396 | "intervalFactor": 10, 397 | "legendFormat": "{{ name }}", 398 | "refId": "A", 399 | "step": 10 400 | } 401 | ], 402 | "timeFrom": null, 403 | "timeShift": null, 404 | "title": "Container CPU Usage", 405 | "tooltip": { 406 | "msResolution": true, 407 | "shared": true, 408 | "sort": 2, 409 | "value_type": "cumulative" 410 | }, 411 | "type": "graph", 412 | "xaxis": { 413 | "show": true 414 | }, 415 | "yaxes": [ 416 | { 417 | "format": "percent", 418 | "label": null, 419 | "logBase": 1, 420 | "max": null, 421 | "min": null, 422 | "show": true 423 | }, 424 | { 425 | "format": "short", 426 | "label": null, 427 | "logBase": 1, 428 | "max": null, 429 | "min": null, 430 | "show": true 431 | } 432 | ] 433 | }, 434 | { 435 | "aliasColors": {}, 436 | "bars": false, 437 | "datasource": "Prometheus", 438 | "editable": true, 439 | "error": false, 440 | "fill": 1, 441 | "grid": { 442 | "threshold1": null, 443 | "threshold1Color": "rgba(216, 200, 27, 0.27)", 444 | "threshold2": null, 445 | "threshold2Color": "rgba(234, 112, 112, 0.22)" 446 | }, 447 | "id": 7, 448 | "isNew": true, 449 | "legend": { 450 | "alignAsTable": true, 451 | "avg": true, 452 | "current": false, 453 | "max": true, 454 | "min": true, 455 | "rightSide": true, 456 | "show": true, 457 | "total": false, 458 | "values": true 459 | }, 460 | "lines": true, 461 | "linewidth": 2, 462 | "links": [], 463 | "nullPointMode": "connected", 464 | "percentage": false, 465 | "pointradius": 5, 466 | "points": false, 467 | "renderer": "flot", 468 | "seriesOverrides": [], 469 | "span": 12, 470 | "stack": false, 471 | "steppedLine": false, 472 | "targets": [ 473 | { 474 | "expr": "sum(container_memory_usage_bytes{container_label_org_label_schema_group=\"monitoring\"}) by (name)", 475 | "interval": "", 476 | "intervalFactor": 10, 477 | "legendFormat": "{{ name }}", 478 | "metric": "container_memory_usage_bytes", 479 | "refId": "A", 480 | "step": 10 481 | } 482 | ], 483 | "timeFrom": null, 484 | "timeShift": null, 485 | "title": "Container Memory Usage", 486 | "tooltip": { 487 | "msResolution": true, 488 | "shared": true, 489 | "sort": 2, 490 | "value_type": "cumulative" 491 | }, 492 | "type": "graph", 493 | "xaxis": { 494 | "show": true 495 | }, 496 | "yaxes": [ 497 | { 498 | "format": "bytes", 499 | "label": null, 500 | "logBase": 1, 501 | "max": null, 502 | "min": null, 503 | "show": true 504 | }, 505 | { 506 | "format": "short", 507 | "label": null, 508 | "logBase": 1, 509 | "max": null, 510 | "min": null, 511 | "show": false 512 | } 513 | ], 514 | "decimals": 2 515 | } 516 | ], 517 | "title": "Resources usage" 518 | }, 519 | { 520 | "title": "Prometheus stats", 521 | "height": "250px", 522 | "editable": true, 523 | "collapse": false, 524 | "panels": [ 525 | { 526 | "title": "Chunks to persist", 527 | "error": false, 528 | "span": 6, 529 | "editable": true, 530 | "type": "graph", 531 | "isNew": true, 532 | "id": 13, 533 | "targets": [ 534 | { 535 | "expr": "prometheus_local_storage_chunks_to_persist", 536 | "intervalFactor": 2, 537 | "refId": "A", 538 | "step": 2, 539 | "legendFormat": "chunks" 540 | } 541 | ], 542 | "datasource": null, 543 | "renderer": "flot", 544 | "yaxes": [ 545 | { 546 | "label": null, 547 | "show": true, 548 | "logBase": 1, 549 | "min": 0, 550 | "max": null, 551 | "format": "short" 552 | }, 553 | { 554 | "label": null, 555 | "show": true, 556 | "logBase": 1, 557 | "min": null, 558 | "max": null, 559 | "format": "short" 560 | } 561 | ], 562 | "xaxis": { 563 | "show": true 564 | }, 565 | "grid": { 566 | "threshold1": null, 567 | "threshold2": null, 568 | "threshold1Color": "rgba(216, 200, 27, 0.27)", 569 | "threshold2Color": "rgba(234, 112, 112, 0.22)" 570 | }, 571 | "lines": true, 572 | "fill": 1, 573 | "linewidth": 2, 574 | "points": false, 575 | "pointradius": 5, 576 | "bars": false, 577 | "stack": false, 578 | "percentage": false, 579 | "legend": { 580 | "show": true, 581 | "values": true, 582 | "min": true, 583 | "max": true, 584 | "current": true, 585 | "total": false, 586 | "avg": true, 587 | "alignAsTable": true 588 | }, 589 | "nullPointMode": "connected", 590 | "steppedLine": false, 591 | "tooltip": { 592 | "value_type": "cumulative", 593 | "shared": true, 594 | "sort": 0, 595 | "msResolution": false 596 | }, 597 | "timeFrom": null, 598 | "timeShift": null, 599 | "aliasColors": {}, 600 | "seriesOverrides": [], 601 | "links": [] 602 | }, 603 | { 604 | "title": "Persistence Urgency", 605 | "error": false, 606 | "span": 6, 607 | "editable": true, 608 | "type": "graph", 609 | "isNew": true, 610 | "id": 14, 611 | "targets": [ 612 | { 613 | "expr": "prometheus_local_storage_persistence_urgency_score", 614 | "intervalFactor": 2, 615 | "refId": "A", 616 | "step": 2, 617 | "legendFormat": "score" 618 | } 619 | ], 620 | "datasource": null, 621 | "renderer": "flot", 622 | "yaxes": [ 623 | { 624 | "label": null, 625 | "show": true, 626 | "logBase": 1, 627 | "min": 0, 628 | "max": null, 629 | "format": "short" 630 | }, 631 | { 632 | "label": null, 633 | "show": true, 634 | "logBase": 1, 635 | "min": null, 636 | "max": null, 637 | "format": "short" 638 | } 639 | ], 640 | "xaxis": { 641 | "show": true 642 | }, 643 | "grid": { 644 | "threshold1": null, 645 | "threshold2": null, 646 | "threshold1Color": "rgba(216, 200, 27, 0.27)", 647 | "threshold2Color": "rgba(234, 112, 112, 0.22)" 648 | }, 649 | "lines": true, 650 | "fill": 1, 651 | "linewidth": 2, 652 | "points": false, 653 | "pointradius": 5, 654 | "bars": false, 655 | "stack": false, 656 | "percentage": false, 657 | "legend": { 658 | "show": true, 659 | "values": true, 660 | "min": true, 661 | "max": true, 662 | "current": true, 663 | "total": false, 664 | "avg": true, 665 | "alignAsTable": true, 666 | "rightSide": false 667 | }, 668 | "nullPointMode": "connected", 669 | "steppedLine": false, 670 | "tooltip": { 671 | "value_type": "cumulative", 672 | "shared": true, 673 | "sort": 0, 674 | "msResolution": false 675 | }, 676 | "timeFrom": null, 677 | "timeShift": null, 678 | "aliasColors": {}, 679 | "seriesOverrides": [ 680 | { 681 | "alias": "score", 682 | "color": "#705DA0" 683 | } 684 | ], 685 | "links": [] 686 | }, 687 | { 688 | "title": "Chunk ops", 689 | "error": false, 690 | "span": 6, 691 | "editable": true, 692 | "type": "graph", 693 | "isNew": true, 694 | "id": 15, 695 | "targets": [ 696 | { 697 | "expr": "rate(prometheus_local_storage_chunk_ops_total[1m])", 698 | "intervalFactor": 2, 699 | "refId": "A", 700 | "step": 2, 701 | "legendFormat": "{{ type }}" 702 | } 703 | ], 704 | "datasource": null, 705 | "renderer": "flot", 706 | "yaxes": [ 707 | { 708 | "label": null, 709 | "show": true, 710 | "logBase": 1, 711 | "min": 0, 712 | "max": null, 713 | "format": "short" 714 | }, 715 | { 716 | "label": null, 717 | "show": false, 718 | "logBase": 1, 719 | "min": null, 720 | "max": null, 721 | "format": "short" 722 | } 723 | ], 724 | "xaxis": { 725 | "show": true 726 | }, 727 | "grid": { 728 | "threshold1": null, 729 | "threshold2": null, 730 | "threshold1Color": "rgba(216, 200, 27, 0.27)", 731 | "threshold2Color": "rgba(234, 112, 112, 0.22)" 732 | }, 733 | "lines": true, 734 | "fill": 1, 735 | "linewidth": 2, 736 | "points": false, 737 | "pointradius": 5, 738 | "bars": false, 739 | "stack": false, 740 | "percentage": false, 741 | "legend": { 742 | "show": true, 743 | "values": true, 744 | "min": true, 745 | "max": true, 746 | "current": false, 747 | "total": false, 748 | "avg": true, 749 | "alignAsTable": true, 750 | "rightSide": true 751 | }, 752 | "nullPointMode": "connected", 753 | "steppedLine": false, 754 | "tooltip": { 755 | "value_type": "cumulative", 756 | "shared": true, 757 | "sort": 0, 758 | "msResolution": false 759 | }, 760 | "timeFrom": null, 761 | "timeShift": null, 762 | "aliasColors": {}, 763 | "seriesOverrides": [], 764 | "links": [], 765 | "decimals": 0 766 | }, 767 | { 768 | "title": "Checkpoint duration", 769 | "error": false, 770 | "span": 6, 771 | "editable": true, 772 | "type": "graph", 773 | "isNew": true, 774 | "id": 16, 775 | "targets": [ 776 | { 777 | "expr": "prometheus_local_storage_checkpoint_duration_seconds", 778 | "intervalFactor": 2, 779 | "refId": "A", 780 | "step": 2, 781 | "legendFormat": "{{ job }}" 782 | } 783 | ], 784 | "datasource": null, 785 | "renderer": "flot", 786 | "yaxes": [ 787 | { 788 | "label": null, 789 | "show": true, 790 | "logBase": 1, 791 | "min": 0, 792 | "max": null, 793 | "format": "s" 794 | }, 795 | { 796 | "label": null, 797 | "show": false, 798 | "logBase": 1, 799 | "min": null, 800 | "max": null, 801 | "format": "short" 802 | } 803 | ], 804 | "xaxis": { 805 | "show": true 806 | }, 807 | "grid": { 808 | "threshold1": null, 809 | "threshold2": null, 810 | "threshold1Color": "rgba(216, 200, 27, 0.27)", 811 | "threshold2Color": "rgba(234, 112, 112, 0.22)" 812 | }, 813 | "lines": true, 814 | "fill": 1, 815 | "linewidth": 2, 816 | "points": false, 817 | "pointradius": 5, 818 | "bars": false, 819 | "stack": false, 820 | "percentage": false, 821 | "legend": { 822 | "show": true, 823 | "values": true, 824 | "min": true, 825 | "max": true, 826 | "current": true, 827 | "total": false, 828 | "avg": true, 829 | "alignAsTable": true, 830 | "rightSide": false 831 | }, 832 | "nullPointMode": "connected", 833 | "steppedLine": false, 834 | "tooltip": { 835 | "value_type": "cumulative", 836 | "shared": true, 837 | "sort": 0, 838 | "msResolution": false 839 | }, 840 | "timeFrom": null, 841 | "timeShift": null, 842 | "aliasColors": {}, 843 | "seriesOverrides": [], 844 | "links": [] 845 | } 846 | ] 847 | }, 848 | { 849 | "collapse": false, 850 | "editable": true, 851 | "height": "250px", 852 | "panels": [ 853 | { 854 | "aliasColors": {}, 855 | "bars": false, 856 | "datasource": "Prometheus", 857 | "decimals": 0, 858 | "editable": true, 859 | "error": false, 860 | "fill": 1, 861 | "grid": { 862 | "threshold1": null, 863 | "threshold1Color": "rgba(216, 200, 27, 0.27)", 864 | "threshold2": null, 865 | "threshold2Color": "rgba(234, 112, 112, 0.22)" 866 | }, 867 | "id": 8, 868 | "isNew": true, 869 | "legend": { 870 | "alignAsTable": true, 871 | "avg": true, 872 | "current": false, 873 | "max": true, 874 | "min": true, 875 | "show": false, 876 | "total": false, 877 | "values": true 878 | }, 879 | "lines": true, 880 | "linewidth": 2, 881 | "links": [], 882 | "nullPointMode": "connected", 883 | "percentage": false, 884 | "pointradius": 5, 885 | "points": false, 886 | "renderer": "flot", 887 | "seriesOverrides": [], 888 | "span": 4, 889 | "stack": false, 890 | "steppedLine": false, 891 | "targets": [ 892 | { 893 | "expr": "rate(prometheus_local_storage_ingested_samples_total[5m])", 894 | "intervalFactor": 1, 895 | "legendFormat": "samples", 896 | "refId": "A", 897 | "step": 1 898 | } 899 | ], 900 | "timeFrom": null, 901 | "timeShift": null, 902 | "title": "Samples ingested 5m rate", 903 | "tooltip": { 904 | "msResolution": true, 905 | "shared": true, 906 | "sort": 0, 907 | "value_type": "cumulative" 908 | }, 909 | "type": "graph", 910 | "xaxis": { 911 | "show": true 912 | }, 913 | "yaxes": [ 914 | { 915 | "format": "short", 916 | "label": null, 917 | "logBase": 10, 918 | "max": null, 919 | "min": null, 920 | "show": true 921 | }, 922 | { 923 | "format": "short", 924 | "label": null, 925 | "logBase": 1, 926 | "max": null, 927 | "min": null, 928 | "show": true 929 | } 930 | ] 931 | }, 932 | { 933 | "aliasColors": {}, 934 | "bars": false, 935 | "datasource": "Prometheus", 936 | "editable": true, 937 | "error": false, 938 | "fill": 1, 939 | "grid": { 940 | "threshold1": null, 941 | "threshold1Color": "rgba(216, 200, 27, 0.27)", 942 | "threshold2": null, 943 | "threshold2Color": "rgba(234, 112, 112, 0.22)" 944 | }, 945 | "id": 10, 946 | "isNew": true, 947 | "legend": { 948 | "avg": false, 949 | "current": false, 950 | "max": false, 951 | "min": false, 952 | "show": false, 953 | "total": false, 954 | "values": false 955 | }, 956 | "lines": true, 957 | "linewidth": 2, 958 | "links": [], 959 | "nullPointMode": "connected", 960 | "percentage": false, 961 | "pointradius": 5, 962 | "points": false, 963 | "renderer": "flot", 964 | "seriesOverrides": [], 965 | "span": 4, 966 | "stack": false, 967 | "steppedLine": false, 968 | "targets": [ 969 | { 970 | "expr": "rate(prometheus_target_interval_length_seconds_count[5m])", 971 | "intervalFactor": 2, 972 | "legendFormat": "{{ interval }}", 973 | "refId": "A", 974 | "step": 2 975 | } 976 | ], 977 | "timeFrom": null, 978 | "timeShift": null, 979 | "title": "Target Scrapes", 980 | "tooltip": { 981 | "msResolution": true, 982 | "shared": true, 983 | "sort": 0, 984 | "value_type": "cumulative" 985 | }, 986 | "type": "graph", 987 | "xaxis": { 988 | "show": true 989 | }, 990 | "yaxes": [ 991 | { 992 | "format": "short", 993 | "label": null, 994 | "logBase": 1, 995 | "max": null, 996 | "min": null, 997 | "show": true 998 | }, 999 | { 1000 | "format": "short", 1001 | "label": null, 1002 | "logBase": 1, 1003 | "max": null, 1004 | "min": null, 1005 | "show": true 1006 | } 1007 | ] 1008 | }, 1009 | { 1010 | "aliasColors": {}, 1011 | "bars": false, 1012 | "datasource": "Prometheus", 1013 | "editable": true, 1014 | "error": false, 1015 | "fill": 1, 1016 | "grid": { 1017 | "threshold1": null, 1018 | "threshold1Color": "rgba(216, 200, 27, 0.27)", 1019 | "threshold2": null, 1020 | "threshold2Color": "rgba(234, 112, 112, 0.22)" 1021 | }, 1022 | "id": 11, 1023 | "isNew": true, 1024 | "legend": { 1025 | "alignAsTable": false, 1026 | "avg": false, 1027 | "current": false, 1028 | "max": false, 1029 | "min": false, 1030 | "show": false, 1031 | "total": false, 1032 | "values": false 1033 | }, 1034 | "lines": true, 1035 | "linewidth": 2, 1036 | "links": [], 1037 | "nullPointMode": "connected", 1038 | "percentage": false, 1039 | "pointradius": 5, 1040 | "points": false, 1041 | "renderer": "flot", 1042 | "seriesOverrides": [], 1043 | "span": 4, 1044 | "stack": false, 1045 | "steppedLine": false, 1046 | "targets": [ 1047 | { 1048 | "expr": "prometheus_target_interval_length_seconds{quantile!=\"0.01\", quantile!=\"0.05\"}", 1049 | "intervalFactor": 2, 1050 | "legendFormat": "{{quantile}} ({{interval}})", 1051 | "refId": "A", 1052 | "step": 2 1053 | } 1054 | ], 1055 | "timeFrom": null, 1056 | "timeShift": null, 1057 | "title": "Scrape Duration", 1058 | "tooltip": { 1059 | "msResolution": true, 1060 | "shared": true, 1061 | "sort": 0, 1062 | "value_type": "cumulative" 1063 | }, 1064 | "type": "graph", 1065 | "xaxis": { 1066 | "show": true 1067 | }, 1068 | "yaxes": [ 1069 | { 1070 | "format": "short", 1071 | "label": null, 1072 | "logBase": 1, 1073 | "max": null, 1074 | "min": null, 1075 | "show": true 1076 | }, 1077 | { 1078 | "format": "short", 1079 | "label": null, 1080 | "logBase": 1, 1081 | "max": null, 1082 | "min": null, 1083 | "show": true 1084 | } 1085 | ] 1086 | } 1087 | ], 1088 | "title": "Prometheus targets" 1089 | }, 1090 | { 1091 | "collapse": false, 1092 | "editable": true, 1093 | "height": "250px", 1094 | "panels": [ 1095 | { 1096 | "aliasColors": {}, 1097 | "bars": false, 1098 | "datasource": "Prometheus", 1099 | "decimals": 0, 1100 | "editable": true, 1101 | "error": false, 1102 | "fill": 1, 1103 | "grid": { 1104 | "threshold1": null, 1105 | "threshold1Color": "rgba(216, 200, 27, 0.27)", 1106 | "threshold2": null, 1107 | "threshold2Color": "rgba(234, 112, 112, 0.22)" 1108 | }, 1109 | "id": 9, 1110 | "isNew": true, 1111 | "legend": { 1112 | "avg": false, 1113 | "current": false, 1114 | "max": false, 1115 | "min": false, 1116 | "show": false, 1117 | "total": false, 1118 | "values": false 1119 | }, 1120 | "lines": true, 1121 | "linewidth": 2, 1122 | "links": [], 1123 | "nullPointMode": "connected", 1124 | "percentage": false, 1125 | "pointradius": 5, 1126 | "points": false, 1127 | "renderer": "flot", 1128 | "seriesOverrides": [], 1129 | "span": 6, 1130 | "stack": false, 1131 | "steppedLine": false, 1132 | "targets": [ 1133 | { 1134 | "expr": "sum(irate(http_requests_total[1m])) ", 1135 | "interval": "10s", 1136 | "intervalFactor": 2, 1137 | "legendFormat": "requests", 1138 | "metric": "http_requests_total", 1139 | "refId": "A", 1140 | "step": 20 1141 | } 1142 | ], 1143 | "timeFrom": null, 1144 | "timeShift": null, 1145 | "title": "HTTP Requests", 1146 | "tooltip": { 1147 | "msResolution": true, 1148 | "shared": true, 1149 | "sort": 0, 1150 | "value_type": "cumulative" 1151 | }, 1152 | "type": "graph", 1153 | "xaxis": { 1154 | "show": true 1155 | }, 1156 | "yaxes": [ 1157 | { 1158 | "format": "short", 1159 | "label": null, 1160 | "logBase": 1, 1161 | "max": null, 1162 | "min": 0, 1163 | "show": true 1164 | }, 1165 | { 1166 | "format": "short", 1167 | "label": null, 1168 | "logBase": 1, 1169 | "max": null, 1170 | "min": null, 1171 | "show": false 1172 | } 1173 | ] 1174 | }, 1175 | { 1176 | "aliasColors": {}, 1177 | "bars": true, 1178 | "datasource": null, 1179 | "decimals": 0, 1180 | "editable": true, 1181 | "error": false, 1182 | "fill": 1, 1183 | "grid": { 1184 | "threshold1": null, 1185 | "threshold1Color": "rgba(216, 200, 27, 0.27)", 1186 | "threshold2": null, 1187 | "threshold2Color": "rgba(234, 112, 112, 0.22)" 1188 | }, 1189 | "id": 12, 1190 | "isNew": true, 1191 | "legend": { 1192 | "alignAsTable": true, 1193 | "avg": false, 1194 | "current": true, 1195 | "hideEmpty": false, 1196 | "hideZero": false, 1197 | "max": false, 1198 | "min": false, 1199 | "rightSide": true, 1200 | "show": true, 1201 | "total": false, 1202 | "values": true 1203 | }, 1204 | "lines": false, 1205 | "linewidth": 2, 1206 | "links": [], 1207 | "nullPointMode": "connected", 1208 | "percentage": false, 1209 | "pointradius": 2, 1210 | "points": true, 1211 | "renderer": "flot", 1212 | "seriesOverrides": [], 1213 | "span": 6, 1214 | "stack": false, 1215 | "steppedLine": false, 1216 | "targets": [ 1217 | { 1218 | "expr": "sum(ALERTS{alertstate=\"firing\"}) by (alertname)", 1219 | "interval": "30s", 1220 | "intervalFactor": 1, 1221 | "legendFormat": "{{ alertname }}", 1222 | "refId": "A", 1223 | "step": 30 1224 | } 1225 | ], 1226 | "timeFrom": null, 1227 | "timeShift": null, 1228 | "title": "Alerts", 1229 | "tooltip": { 1230 | "msResolution": false, 1231 | "shared": false, 1232 | "sort": 0, 1233 | "value_type": "individual" 1234 | }, 1235 | "type": "graph", 1236 | "xaxis": { 1237 | "show": true 1238 | }, 1239 | "yaxes": [ 1240 | { 1241 | "format": "short", 1242 | "label": null, 1243 | "logBase": 1, 1244 | "max": null, 1245 | "min": 0, 1246 | "show": true 1247 | }, 1248 | { 1249 | "format": "short", 1250 | "label": null, 1251 | "logBase": 1, 1252 | "max": null, 1253 | "min": null, 1254 | "show": false 1255 | } 1256 | ] 1257 | } 1258 | ], 1259 | "title": "Prometheus requests" 1260 | } 1261 | ], 1262 | "time": { 1263 | "from": "now-15m", 1264 | "to": "now" 1265 | }, 1266 | "timepicker": { 1267 | "refresh_intervals": [ 1268 | "5s", 1269 | "10s", 1270 | "30s", 1271 | "1m", 1272 | "5m", 1273 | "15m", 1274 | "30m", 1275 | "1h", 1276 | "2h", 1277 | "1d" 1278 | ], 1279 | "time_options": [ 1280 | "5m", 1281 | "15m", 1282 | "1h", 1283 | "6h", 1284 | "12h", 1285 | "24h", 1286 | "2d", 1287 | "7d", 1288 | "30d" 1289 | ] 1290 | }, 1291 | "templating": { 1292 | "list": [] 1293 | }, 1294 | "annotations": { 1295 | "list": [] 1296 | }, 1297 | "refresh": "10s", 1298 | "schemaVersion": 12, 1299 | "version": 21, 1300 | "links": [], 1301 | "gnetId": null 1302 | } 1303 | -------------------------------------------------------------------------------- /grafana/dashboards/docker_host.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": null, 3 | "title": "Docker Host", 4 | "description": "Docker host metrics", 5 | "tags": [ 6 | "system" 7 | ], 8 | "style": "dark", 9 | "timezone": "browser", 10 | "editable": true, 11 | "hideControls": false, 12 | "sharedCrosshair": true, 13 | "rows": [ 14 | { 15 | "collapse": false, 16 | "editable": true, 17 | "height": "100px", 18 | "panels": [ 19 | { 20 | "cacheTimeout": null, 21 | "colorBackground": false, 22 | "colorValue": false, 23 | "colors": [ 24 | "rgba(245, 54, 54, 0.9)", 25 | "rgba(237, 129, 40, 0.89)", 26 | "rgba(50, 172, 45, 0.97)" 27 | ], 28 | "datasource": "Prometheus", 29 | "decimals": 1, 30 | "editable": true, 31 | "error": false, 32 | "format": "s", 33 | "gauge": { 34 | "maxValue": 100, 35 | "minValue": 0, 36 | "show": false, 37 | "thresholdLabels": false, 38 | "thresholdMarkers": true 39 | }, 40 | "id": 1, 41 | "interval": null, 42 | "isNew": true, 43 | "links": [], 44 | "mappingType": 1, 45 | "mappingTypes": [ 46 | { 47 | "name": "value to text", 48 | "value": 1 49 | }, 50 | { 51 | "name": "range to text", 52 | "value": 2 53 | } 54 | ], 55 | "maxDataPoints": 100, 56 | "nullPointMode": "connected", 57 | "nullText": null, 58 | "postfix": "s", 59 | "postfixFontSize": "80%", 60 | "prefix": "", 61 | "prefixFontSize": "50%", 62 | "rangeMaps": [ 63 | { 64 | "from": "null", 65 | "text": "N/A", 66 | "to": "null" 67 | } 68 | ], 69 | "span": 2, 70 | "sparkline": { 71 | "fillColor": "rgba(31, 118, 189, 0.18)", 72 | "full": false, 73 | "lineColor": "rgb(31, 120, 193)", 74 | "show": false 75 | }, 76 | "targets": [ 77 | { 78 | "expr": "node_time - node_boot_time", 79 | "interval": "30s", 80 | "intervalFactor": 1, 81 | "refId": "A", 82 | "step": 30 83 | } 84 | ], 85 | "thresholds": "", 86 | "title": "Uptime", 87 | "type": "singlestat", 88 | "valueFontSize": "80%", 89 | "valueMaps": [ 90 | { 91 | "op": "=", 92 | "text": "N/A", 93 | "value": "null" 94 | } 95 | ], 96 | "valueName": "avg", 97 | "timeFrom": "10s", 98 | "hideTimeOverride": true 99 | }, 100 | { 101 | "cacheTimeout": null, 102 | "colorBackground": false, 103 | "colorValue": false, 104 | "colors": [ 105 | "rgba(245, 54, 54, 0.9)", 106 | "rgba(237, 129, 40, 0.89)", 107 | "rgba(50, 172, 45, 0.97)" 108 | ], 109 | "datasource": "Prometheus", 110 | "editable": true, 111 | "error": false, 112 | "format": "percent", 113 | "gauge": { 114 | "maxValue": 100, 115 | "minValue": 0, 116 | "show": false, 117 | "thresholdLabels": false, 118 | "thresholdMarkers": true 119 | }, 120 | "id": 13, 121 | "interval": null, 122 | "isNew": true, 123 | "links": [], 124 | "mappingType": 1, 125 | "mappingTypes": [ 126 | { 127 | "name": "value to text", 128 | "value": 1 129 | }, 130 | { 131 | "name": "range to text", 132 | "value": 2 133 | } 134 | ], 135 | "maxDataPoints": 100, 136 | "nullPointMode": "connected", 137 | "nullText": null, 138 | "postfix": "", 139 | "postfixFontSize": "50%", 140 | "prefix": "", 141 | "prefixFontSize": "50%", 142 | "rangeMaps": [ 143 | { 144 | "from": "null", 145 | "text": "N/A", 146 | "to": "null" 147 | } 148 | ], 149 | "span": 2, 150 | "sparkline": { 151 | "fillColor": "rgba(31, 118, 189, 0.18)", 152 | "full": false, 153 | "lineColor": "rgb(31, 120, 193)", 154 | "show": false 155 | }, 156 | "targets": [ 157 | { 158 | "expr": "sum(rate(node_cpu{mode=\"idle\"}[1m])) * 100 / scalar(count(node_cpu{mode=\"user\"}))", 159 | "interval": "10s", 160 | "intervalFactor": 2, 161 | "legendFormat": "", 162 | "refId": "A", 163 | "step": 20 164 | } 165 | ], 166 | "thresholds": "", 167 | "title": "CPU Idle", 168 | "type": "singlestat", 169 | "valueFontSize": "80%", 170 | "valueMaps": [ 171 | { 172 | "op": "=", 173 | "text": "N/A", 174 | "value": "null" 175 | } 176 | ], 177 | "valueName": "avg", 178 | "timeFrom": "10s", 179 | "hideTimeOverride": true 180 | }, 181 | { 182 | "cacheTimeout": null, 183 | "colorBackground": false, 184 | "colorValue": false, 185 | "colors": [ 186 | "rgba(245, 54, 54, 0.9)", 187 | "rgba(237, 129, 40, 0.89)", 188 | "rgba(50, 172, 45, 0.97)" 189 | ], 190 | "datasource": "Prometheus", 191 | "editable": true, 192 | "error": false, 193 | "format": "none", 194 | "gauge": { 195 | "maxValue": 100, 196 | "minValue": 0, 197 | "show": false, 198 | "thresholdLabels": false, 199 | "thresholdMarkers": true 200 | }, 201 | "id": 12, 202 | "interval": null, 203 | "isNew": true, 204 | "links": [], 205 | "mappingType": 1, 206 | "mappingTypes": [ 207 | { 208 | "name": "value to text", 209 | "value": 1 210 | }, 211 | { 212 | "name": "range to text", 213 | "value": 2 214 | } 215 | ], 216 | "maxDataPoints": 100, 217 | "nullPointMode": "connected", 218 | "nullText": null, 219 | "postfix": "", 220 | "postfixFontSize": "50%", 221 | "prefix": "", 222 | "prefixFontSize": "50%", 223 | "rangeMaps": [ 224 | { 225 | "from": "null", 226 | "text": "N/A", 227 | "to": "null" 228 | } 229 | ], 230 | "span": 2, 231 | "sparkline": { 232 | "fillColor": "rgba(31, 118, 189, 0.18)", 233 | "full": false, 234 | "lineColor": "rgb(31, 120, 193)", 235 | "show": false 236 | }, 237 | "targets": [ 238 | { 239 | "expr": "machine_cpu_cores", 240 | "intervalFactor": 2, 241 | "metric": "machine_cpu_cores", 242 | "refId": "A", 243 | "step": 2 244 | } 245 | ], 246 | "thresholds": "", 247 | "title": "CPU Cores", 248 | "type": "singlestat", 249 | "valueFontSize": "80%", 250 | "valueMaps": [ 251 | { 252 | "op": "=", 253 | "text": "N/A", 254 | "value": "null" 255 | } 256 | ], 257 | "valueName": "avg", 258 | "timeFrom": "10s", 259 | "hideTimeOverride": true 260 | }, 261 | { 262 | "cacheTimeout": null, 263 | "colorBackground": false, 264 | "colorValue": false, 265 | "colors": [ 266 | "rgba(245, 54, 54, 0.9)", 267 | "rgba(237, 129, 40, 0.89)", 268 | "rgba(50, 172, 45, 0.97)" 269 | ], 270 | "datasource": "Prometheus", 271 | "editable": true, 272 | "error": false, 273 | "format": "bytes", 274 | "gauge": { 275 | "maxValue": 100, 276 | "minValue": 0, 277 | "show": false, 278 | "thresholdLabels": false, 279 | "thresholdMarkers": true 280 | }, 281 | "id": 2, 282 | "interval": null, 283 | "isNew": true, 284 | "links": [], 285 | "mappingType": 1, 286 | "mappingTypes": [ 287 | { 288 | "name": "value to text", 289 | "value": 1 290 | }, 291 | { 292 | "name": "range to text", 293 | "value": 2 294 | } 295 | ], 296 | "maxDataPoints": 100, 297 | "nullPointMode": "connected", 298 | "nullText": null, 299 | "postfix": "", 300 | "postfixFontSize": "50%", 301 | "prefix": "", 302 | "prefixFontSize": "50%", 303 | "rangeMaps": [ 304 | { 305 | "from": "null", 306 | "text": "N/A", 307 | "to": "null" 308 | } 309 | ], 310 | "span": 2, 311 | "sparkline": { 312 | "fillColor": "rgba(31, 118, 189, 0.18)", 313 | "full": false, 314 | "lineColor": "rgb(31, 120, 193)", 315 | "show": false 316 | }, 317 | "targets": [ 318 | { 319 | "expr": "node_memory_MemAvailable", 320 | "interval": "30s", 321 | "intervalFactor": 2, 322 | "legendFormat": "", 323 | "refId": "A", 324 | "step": 60 325 | } 326 | ], 327 | "thresholds": "", 328 | "title": "Available Memory", 329 | "type": "singlestat", 330 | "valueFontSize": "80%", 331 | "valueMaps": [ 332 | { 333 | "op": "=", 334 | "text": "N/A", 335 | "value": "null" 336 | } 337 | ], 338 | "valueName": "avg", 339 | "timeFrom": "10s", 340 | "hideTimeOverride": true 341 | }, 342 | { 343 | "cacheTimeout": null, 344 | "colorBackground": false, 345 | "colorValue": false, 346 | "colors": [ 347 | "rgba(245, 54, 54, 0.9)", 348 | "rgba(237, 129, 40, 0.89)", 349 | "rgba(50, 172, 45, 0.97)" 350 | ], 351 | "datasource": "Prometheus", 352 | "editable": true, 353 | "error": false, 354 | "format": "bytes", 355 | "gauge": { 356 | "maxValue": 100, 357 | "minValue": 0, 358 | "show": false, 359 | "thresholdLabels": false, 360 | "thresholdMarkers": true 361 | }, 362 | "id": 3, 363 | "interval": null, 364 | "isNew": true, 365 | "links": [], 366 | "mappingType": 1, 367 | "mappingTypes": [ 368 | { 369 | "name": "value to text", 370 | "value": 1 371 | }, 372 | { 373 | "name": "range to text", 374 | "value": 2 375 | } 376 | ], 377 | "maxDataPoints": 100, 378 | "nullPointMode": "connected", 379 | "nullText": null, 380 | "postfix": "", 381 | "postfixFontSize": "50%", 382 | "prefix": "", 383 | "prefixFontSize": "50%", 384 | "rangeMaps": [ 385 | { 386 | "from": "null", 387 | "text": "N/A", 388 | "to": "null" 389 | } 390 | ], 391 | "span": 2, 392 | "sparkline": { 393 | "fillColor": "rgba(31, 118, 189, 0.18)", 394 | "full": false, 395 | "lineColor": "rgb(31, 120, 193)", 396 | "show": false 397 | }, 398 | "targets": [ 399 | { 400 | "expr": "node_memory_SwapFree", 401 | "interval": "30s", 402 | "intervalFactor": 2, 403 | "refId": "A", 404 | "step": 60 405 | } 406 | ], 407 | "thresholds": "", 408 | "title": "Free Swap", 409 | "type": "singlestat", 410 | "valueFontSize": "80%", 411 | "valueMaps": [ 412 | { 413 | "op": "=", 414 | "text": "N/A", 415 | "value": "null" 416 | } 417 | ], 418 | "valueName": "avg", 419 | "timeFrom": "10s", 420 | "hideTimeOverride": true 421 | }, 422 | { 423 | "cacheTimeout": null, 424 | "colorBackground": false, 425 | "colorValue": false, 426 | "colors": [ 427 | "rgba(245, 54, 54, 0.9)", 428 | "rgba(237, 129, 40, 0.89)", 429 | "rgba(50, 172, 45, 0.97)" 430 | ], 431 | "datasource": "Prometheus", 432 | "editable": true, 433 | "error": false, 434 | "format": "bytes", 435 | "gauge": { 436 | "maxValue": 100, 437 | "minValue": 0, 438 | "show": false, 439 | "thresholdLabels": false, 440 | "thresholdMarkers": true 441 | }, 442 | "id": 4, 443 | "interval": null, 444 | "isNew": true, 445 | "links": [], 446 | "mappingType": 1, 447 | "mappingTypes": [ 448 | { 449 | "name": "value to text", 450 | "value": 1 451 | }, 452 | { 453 | "name": "range to text", 454 | "value": 2 455 | } 456 | ], 457 | "maxDataPoints": 100, 458 | "nullPointMode": "connected", 459 | "nullText": null, 460 | "postfix": "", 461 | "postfixFontSize": "50%", 462 | "prefix": "", 463 | "prefixFontSize": "50%", 464 | "rangeMaps": [ 465 | { 466 | "from": "null", 467 | "text": "N/A", 468 | "to": "null" 469 | } 470 | ], 471 | "span": 2, 472 | "sparkline": { 473 | "fillColor": "rgba(31, 118, 189, 0.18)", 474 | "full": false, 475 | "lineColor": "rgb(31, 120, 193)", 476 | "show": false 477 | }, 478 | "targets": [ 479 | { 480 | "expr": "sum(node_filesystem_free{fstype=\"aufs\"})", 481 | "interval": "30s", 482 | "intervalFactor": 1, 483 | "legendFormat": "", 484 | "refId": "A", 485 | "step": 30 486 | } 487 | ], 488 | "thresholds": "", 489 | "title": "Free Storage", 490 | "type": "singlestat", 491 | "valueFontSize": "80%", 492 | "valueMaps": [ 493 | { 494 | "op": "=", 495 | "text": "N/A", 496 | "value": "null" 497 | } 498 | ], 499 | "valueName": "avg", 500 | "timeFrom": "10s", 501 | "hideTimeOverride": true 502 | } 503 | ], 504 | "title": "Available resources" 505 | }, 506 | { 507 | "collapse": false, 508 | "editable": true, 509 | "height": "150px", 510 | "panels": [ 511 | { 512 | "aliasColors": {}, 513 | "bars": true, 514 | "datasource": "Prometheus", 515 | "decimals": 2, 516 | "editable": true, 517 | "error": false, 518 | "fill": 1, 519 | "grid": { 520 | "threshold1": null, 521 | "threshold1Color": "rgba(216, 200, 27, 0.27)", 522 | "threshold2": null, 523 | "threshold2Color": "rgba(234, 112, 112, 0.22)" 524 | }, 525 | "id": 9, 526 | "isNew": true, 527 | "legend": { 528 | "avg": false, 529 | "current": false, 530 | "max": false, 531 | "min": false, 532 | "show": false, 533 | "total": false, 534 | "values": false 535 | }, 536 | "lines": false, 537 | "linewidth": 2, 538 | "links": [], 539 | "nullPointMode": "connected", 540 | "percentage": false, 541 | "pointradius": 5, 542 | "points": false, 543 | "renderer": "flot", 544 | "seriesOverrides": [ 545 | { 546 | "alias": "load 1m", 547 | "color": "#1F78C1" 548 | } 549 | ], 550 | "span": 4, 551 | "stack": false, 552 | "steppedLine": false, 553 | "targets": [ 554 | { 555 | "expr": "node_load1", 556 | "interval": "10s", 557 | "intervalFactor": 1, 558 | "legendFormat": "load 1m", 559 | "refId": "A", 560 | "step": 10 561 | } 562 | ], 563 | "timeFrom": null, 564 | "timeShift": null, 565 | "title": "Load Average 1m", 566 | "tooltip": { 567 | "msResolution": true, 568 | "shared": true, 569 | "sort": 0, 570 | "value_type": "cumulative" 571 | }, 572 | "type": "graph", 573 | "xaxis": { 574 | "show": true 575 | }, 576 | "yaxes": [ 577 | { 578 | "format": "short", 579 | "label": null, 580 | "logBase": 1, 581 | "max": null, 582 | "min": 0, 583 | "show": true 584 | }, 585 | { 586 | "format": "short", 587 | "label": null, 588 | "logBase": 1, 589 | "max": null, 590 | "min": null, 591 | "show": false 592 | } 593 | ] 594 | }, 595 | { 596 | "aliasColors": {}, 597 | "bars": true, 598 | "datasource": "Prometheus", 599 | "editable": true, 600 | "error": false, 601 | "fill": 1, 602 | "grid": { 603 | "threshold1": null, 604 | "threshold1Color": "rgba(216, 200, 27, 0.27)", 605 | "threshold2": null, 606 | "threshold2Color": "rgba(234, 112, 112, 0.22)" 607 | }, 608 | "id": 10, 609 | "isNew": true, 610 | "legend": { 611 | "avg": false, 612 | "current": false, 613 | "max": false, 614 | "min": false, 615 | "show": false, 616 | "total": false, 617 | "values": false 618 | }, 619 | "lines": false, 620 | "linewidth": 2, 621 | "links": [], 622 | "nullPointMode": "connected", 623 | "percentage": false, 624 | "pointradius": 5, 625 | "points": false, 626 | "renderer": "flot", 627 | "seriesOverrides": [ 628 | { 629 | "alias": "blocked by I/O", 630 | "color": "#58140C" 631 | } 632 | ], 633 | "span": 4, 634 | "stack": true, 635 | "steppedLine": false, 636 | "targets": [ 637 | { 638 | "expr": "node_procs_running", 639 | "interval": "10s", 640 | "intervalFactor": 1, 641 | "legendFormat": "running", 642 | "metric": "node_procs_running", 643 | "refId": "A", 644 | "step": 10 645 | }, 646 | { 647 | "expr": "node_procs_blocked", 648 | "interval": "10s", 649 | "intervalFactor": 1, 650 | "legendFormat": "blocked by I/O", 651 | "metric": "node_procs_blocked", 652 | "refId": "B", 653 | "step": 10 654 | } 655 | ], 656 | "timeFrom": null, 657 | "timeShift": null, 658 | "title": "Processes", 659 | "tooltip": { 660 | "msResolution": true, 661 | "shared": true, 662 | "sort": 2, 663 | "value_type": "individual" 664 | }, 665 | "type": "graph", 666 | "xaxis": { 667 | "show": true 668 | }, 669 | "yaxes": [ 670 | { 671 | "format": "short", 672 | "label": null, 673 | "logBase": 1, 674 | "max": null, 675 | "min": 0, 676 | "show": true 677 | }, 678 | { 679 | "format": "short", 680 | "label": null, 681 | "logBase": 1, 682 | "max": null, 683 | "min": null, 684 | "show": false 685 | } 686 | ] 687 | }, 688 | { 689 | "aliasColors": {}, 690 | "bars": true, 691 | "datasource": "Prometheus", 692 | "editable": true, 693 | "error": false, 694 | "fill": 1, 695 | "grid": { 696 | "threshold1": null, 697 | "threshold1Color": "rgba(216, 200, 27, 0.27)", 698 | "threshold2": null, 699 | "threshold2Color": "rgba(234, 112, 112, 0.22)" 700 | }, 701 | "id": 11, 702 | "isNew": true, 703 | "legend": { 704 | "avg": false, 705 | "current": false, 706 | "max": false, 707 | "min": false, 708 | "show": false, 709 | "total": false, 710 | "values": false 711 | }, 712 | "lines": false, 713 | "linewidth": 2, 714 | "links": [], 715 | "nullPointMode": "connected", 716 | "percentage": false, 717 | "pointradius": 5, 718 | "points": false, 719 | "renderer": "flot", 720 | "seriesOverrides": [ 721 | { 722 | "alias": "interrupts", 723 | "color": "#806EB7" 724 | } 725 | ], 726 | "span": 4, 727 | "stack": false, 728 | "steppedLine": false, 729 | "targets": [ 730 | { 731 | "expr": " irate(node_intr[5m])", 732 | "interval": "10s", 733 | "intervalFactor": 1, 734 | "legendFormat": "interrupts", 735 | "metric": "node_intr", 736 | "refId": "A", 737 | "step": 10 738 | } 739 | ], 740 | "timeFrom": null, 741 | "timeShift": null, 742 | "title": "Interrupts", 743 | "tooltip": { 744 | "msResolution": true, 745 | "shared": true, 746 | "sort": 0, 747 | "value_type": "cumulative" 748 | }, 749 | "type": "graph", 750 | "xaxis": { 751 | "show": true 752 | }, 753 | "yaxes": [ 754 | { 755 | "format": "short", 756 | "label": null, 757 | "logBase": 1, 758 | "max": null, 759 | "min": null, 760 | "show": true 761 | }, 762 | { 763 | "format": "short", 764 | "label": null, 765 | "logBase": 1, 766 | "max": null, 767 | "min": null, 768 | "show": false 769 | } 770 | ] 771 | } 772 | ], 773 | "title": "Load" 774 | }, 775 | { 776 | "collapse": false, 777 | "editable": true, 778 | "height": "250px", 779 | "panels": [ 780 | { 781 | "aliasColors": {}, 782 | "bars": false, 783 | "datasource": "Prometheus", 784 | "decimals": 2, 785 | "editable": true, 786 | "error": false, 787 | "fill": 4, 788 | "grid": { 789 | "threshold1": null, 790 | "threshold1Color": "rgba(216, 200, 27, 0.27)", 791 | "threshold2": null, 792 | "threshold2Color": "rgba(234, 112, 112, 0.22)" 793 | }, 794 | "id": 5, 795 | "isNew": true, 796 | "legend": { 797 | "alignAsTable": true, 798 | "avg": true, 799 | "current": false, 800 | "max": true, 801 | "min": true, 802 | "rightSide": true, 803 | "show": true, 804 | "total": false, 805 | "values": true 806 | }, 807 | "lines": true, 808 | "linewidth": 2, 809 | "links": [], 810 | "nullPointMode": "connected", 811 | "percentage": false, 812 | "pointradius": 5, 813 | "points": false, 814 | "renderer": "flot", 815 | "seriesOverrides": [], 816 | "span": 12, 817 | "stack": true, 818 | "steppedLine": false, 819 | "targets": [ 820 | { 821 | "expr": "sum(rate(node_cpu[1m])) by (mode) * 100 / scalar(count(node_cpu{mode=\"user\"}))", 822 | "intervalFactor": 10, 823 | "legendFormat": "{{ mode }}", 824 | "metric": "node_cpu", 825 | "refId": "A", 826 | "step": 10 827 | } 828 | ], 829 | "timeFrom": null, 830 | "timeShift": null, 831 | "title": "CPU Usage", 832 | "tooltip": { 833 | "msResolution": true, 834 | "shared": true, 835 | "sort": 2, 836 | "value_type": "individual" 837 | }, 838 | "type": "graph", 839 | "xaxis": { 840 | "show": true 841 | }, 842 | "yaxes": [ 843 | { 844 | "format": "percent", 845 | "label": null, 846 | "logBase": 1, 847 | "max": 100, 848 | "min": 0, 849 | "show": true 850 | }, 851 | { 852 | "format": "short", 853 | "label": null, 854 | "logBase": 1, 855 | "max": null, 856 | "min": 0, 857 | "show": true 858 | } 859 | ] 860 | } 861 | ], 862 | "title": "CPU" 863 | }, 864 | { 865 | "collapse": false, 866 | "editable": true, 867 | "height": "250px", 868 | "panels": [ 869 | { 870 | "aliasColors": {}, 871 | "bars": false, 872 | "datasource": "Prometheus", 873 | "decimals": 2, 874 | "editable": true, 875 | "error": false, 876 | "fill": 4, 877 | "grid": { 878 | "threshold1": null, 879 | "threshold1Color": "rgba(216, 200, 27, 0.27)", 880 | "threshold2": null, 881 | "threshold2Color": "rgba(234, 112, 112, 0.22)" 882 | }, 883 | "id": 6, 884 | "isNew": true, 885 | "legend": { 886 | "alignAsTable": true, 887 | "avg": true, 888 | "current": false, 889 | "max": true, 890 | "min": true, 891 | "rightSide": true, 892 | "show": true, 893 | "total": false, 894 | "values": true 895 | }, 896 | "lines": true, 897 | "linewidth": 2, 898 | "links": [], 899 | "nullPointMode": "null", 900 | "percentage": false, 901 | "pointradius": 5, 902 | "points": false, 903 | "renderer": "flot", 904 | "seriesOverrides": [ 905 | { 906 | "alias": "Used", 907 | "color": "#BF1B00" 908 | }, 909 | { 910 | "alias": "Free", 911 | "color": "#7EB26D" 912 | }, 913 | { 914 | "alias": "Buffers", 915 | "color": "#6ED0E0" 916 | }, 917 | { 918 | "alias": "Cached", 919 | "color": "#EF843C" 920 | } 921 | ], 922 | "span": 12, 923 | "stack": true, 924 | "steppedLine": false, 925 | "targets": [ 926 | { 927 | "expr": "node_memory_MemTotal - (node_memory_MemFree + node_memory_Buffers + node_memory_Cached)", 928 | "intervalFactor": 1, 929 | "legendFormat": "Used", 930 | "refId": "A", 931 | "step": 1 932 | }, 933 | { 934 | "expr": "node_memory_MemFree", 935 | "intervalFactor": 1, 936 | "legendFormat": "Free", 937 | "refId": "B", 938 | "step": 1 939 | }, 940 | { 941 | "expr": "node_memory_Buffers", 942 | "intervalFactor": 1, 943 | "legendFormat": "Buffers", 944 | "refId": "C", 945 | "step": 1 946 | }, 947 | { 948 | "expr": "node_memory_Cached", 949 | "intervalFactor": 1, 950 | "legendFormat": "Cached", 951 | "refId": "D", 952 | "step": 1 953 | } 954 | ], 955 | "timeFrom": null, 956 | "timeShift": null, 957 | "title": "Memory Usage", 958 | "tooltip": { 959 | "msResolution": true, 960 | "shared": true, 961 | "sort": 2, 962 | "value_type": "individual" 963 | }, 964 | "type": "graph", 965 | "xaxis": { 966 | "show": true 967 | }, 968 | "yaxes": [ 969 | { 970 | "format": "bytes", 971 | "label": null, 972 | "logBase": 1, 973 | "max": null, 974 | "min": null, 975 | "show": true 976 | }, 977 | { 978 | "format": "short", 979 | "label": null, 980 | "logBase": 1, 981 | "max": null, 982 | "min": null, 983 | "show": true 984 | } 985 | ] 986 | } 987 | ], 988 | "title": "Memory" 989 | }, 990 | { 991 | "collapse": false, 992 | "editable": true, 993 | "height": "250px", 994 | "panels": [ 995 | { 996 | "aliasColors": {}, 997 | "bars": false, 998 | "datasource": "Prometheus", 999 | "decimals": 2, 1000 | "editable": true, 1001 | "error": false, 1002 | "fill": 1, 1003 | "grid": { 1004 | "threshold1": null, 1005 | "threshold1Color": "rgba(216, 200, 27, 0.27)", 1006 | "threshold2": null, 1007 | "threshold2Color": "rgba(234, 112, 112, 0.22)" 1008 | }, 1009 | "id": 7, 1010 | "isNew": true, 1011 | "legend": { 1012 | "alignAsTable": true, 1013 | "avg": true, 1014 | "current": false, 1015 | "max": true, 1016 | "min": true, 1017 | "rightSide": true, 1018 | "show": true, 1019 | "total": false, 1020 | "values": true 1021 | }, 1022 | "lines": true, 1023 | "linewidth": 2, 1024 | "links": [], 1025 | "nullPointMode": "connected", 1026 | "percentage": false, 1027 | "pointradius": 5, 1028 | "points": false, 1029 | "renderer": "flot", 1030 | "seriesOverrides": [ 1031 | { 1032 | "alias": "read", 1033 | "yaxis": 1 1034 | }, 1035 | { 1036 | "alias": "written", 1037 | "yaxis": 1 1038 | }, 1039 | { 1040 | "alias": "io time", 1041 | "yaxis": 2 1042 | } 1043 | ], 1044 | "span": 12, 1045 | "stack": false, 1046 | "steppedLine": false, 1047 | "targets": [ 1048 | { 1049 | "expr": "sum(irate(node_disk_bytes_read[1m]))", 1050 | "interval": "", 1051 | "intervalFactor": 1, 1052 | "legendFormat": "read", 1053 | "metric": "node_disk_bytes_read", 1054 | "refId": "A", 1055 | "step": 1 1056 | }, 1057 | { 1058 | "expr": "sum(irate(node_disk_bytes_written[1m]))", 1059 | "intervalFactor": 1, 1060 | "legendFormat": "written", 1061 | "metric": "node_disk_bytes_written", 1062 | "refId": "B", 1063 | "step": 1 1064 | }, 1065 | { 1066 | "expr": "sum(irate(node_disk_io_time_ms[1m]))", 1067 | "intervalFactor": 1, 1068 | "legendFormat": "io time", 1069 | "metric": "node_disk_io_time_ms", 1070 | "refId": "C", 1071 | "step": 1 1072 | } 1073 | ], 1074 | "timeFrom": null, 1075 | "timeShift": null, 1076 | "title": "I/O Usage", 1077 | "tooltip": { 1078 | "msResolution": true, 1079 | "shared": true, 1080 | "sort": 0, 1081 | "value_type": "cumulative" 1082 | }, 1083 | "type": "graph", 1084 | "xaxis": { 1085 | "show": true 1086 | }, 1087 | "yaxes": [ 1088 | { 1089 | "format": "Bps", 1090 | "label": null, 1091 | "logBase": 1, 1092 | "max": null, 1093 | "min": 0, 1094 | "show": true 1095 | }, 1096 | { 1097 | "format": "ms", 1098 | "label": null, 1099 | "logBase": 1, 1100 | "max": null, 1101 | "min": null, 1102 | "show": true 1103 | } 1104 | ] 1105 | } 1106 | ], 1107 | "title": "I/O" 1108 | }, 1109 | { 1110 | "collapse": false, 1111 | "editable": true, 1112 | "height": "250px", 1113 | "panels": [ 1114 | { 1115 | "aliasColors": {}, 1116 | "bars": false, 1117 | "datasource": "Prometheus", 1118 | "decimals": 2, 1119 | "editable": true, 1120 | "error": false, 1121 | "fill": 4, 1122 | "grid": { 1123 | "threshold1": null, 1124 | "threshold1Color": "rgba(216, 200, 27, 0.27)", 1125 | "threshold2": null, 1126 | "threshold2Color": "rgba(234, 112, 112, 0.22)" 1127 | }, 1128 | "id": 8, 1129 | "isNew": true, 1130 | "legend": { 1131 | "alignAsTable": true, 1132 | "avg": true, 1133 | "current": false, 1134 | "max": true, 1135 | "min": true, 1136 | "rightSide": true, 1137 | "show": true, 1138 | "total": false, 1139 | "values": true 1140 | }, 1141 | "lines": true, 1142 | "linewidth": 2, 1143 | "links": [], 1144 | "nullPointMode": "connected", 1145 | "percentage": false, 1146 | "pointradius": 5, 1147 | "points": false, 1148 | "renderer": "flot", 1149 | "seriesOverrides": [], 1150 | "span": 12, 1151 | "stack": true, 1152 | "steppedLine": false, 1153 | "targets": [ 1154 | { 1155 | "expr": "irate(node_network_receive_bytes{device!=\"lo\"}[1m])", 1156 | "intervalFactor": 1, 1157 | "legendFormat": "In: {{ device }}", 1158 | "metric": "node_network_receive_bytes", 1159 | "refId": "A", 1160 | "step": 1 1161 | }, 1162 | { 1163 | "expr": "irate(node_network_transmit_bytes{device!=\"lo\"}[1m])", 1164 | "intervalFactor": 1, 1165 | "legendFormat": "Out: {{ device }}", 1166 | "metric": "node_network_transmit_bytes", 1167 | "refId": "B", 1168 | "step": 1 1169 | } 1170 | ], 1171 | "timeFrom": null, 1172 | "timeShift": null, 1173 | "title": "Network Usage", 1174 | "tooltip": { 1175 | "msResolution": true, 1176 | "shared": true, 1177 | "sort": 2, 1178 | "value_type": "individual" 1179 | }, 1180 | "type": "graph", 1181 | "xaxis": { 1182 | "show": true 1183 | }, 1184 | "yaxes": [ 1185 | { 1186 | "format": "Bps", 1187 | "label": null, 1188 | "logBase": 1, 1189 | "max": null, 1190 | "min": 0, 1191 | "show": true 1192 | }, 1193 | { 1194 | "format": "short", 1195 | "label": null, 1196 | "logBase": 1, 1197 | "max": null, 1198 | "min": null, 1199 | "show": false 1200 | } 1201 | ] 1202 | } 1203 | ], 1204 | "title": "Network" 1205 | }, 1206 | { 1207 | "collapse": false, 1208 | "editable": true, 1209 | "height": "250px", 1210 | "panels": [ 1211 | { 1212 | "aliasColors": {}, 1213 | "bars": false, 1214 | "datasource": "Prometheus", 1215 | "decimals": 2, 1216 | "editable": true, 1217 | "error": false, 1218 | "fill": 4, 1219 | "grid": { 1220 | "threshold1": null, 1221 | "threshold1Color": "rgba(216, 200, 27, 0.27)", 1222 | "threshold2": null, 1223 | "threshold2Color": "rgba(234, 112, 112, 0.22)" 1224 | }, 1225 | "id": 14, 1226 | "isNew": true, 1227 | "legend": { 1228 | "alignAsTable": true, 1229 | "avg": true, 1230 | "current": false, 1231 | "max": true, 1232 | "min": true, 1233 | "rightSide": false, 1234 | "show": true, 1235 | "total": false, 1236 | "values": true 1237 | }, 1238 | "lines": true, 1239 | "linewidth": 2, 1240 | "links": [], 1241 | "nullPointMode": "connected", 1242 | "percentage": false, 1243 | "pointradius": 5, 1244 | "points": false, 1245 | "renderer": "flot", 1246 | "seriesOverrides": [ 1247 | { 1248 | "alias": "Used", 1249 | "color": "#890F02" 1250 | }, 1251 | { 1252 | "alias": "Free", 1253 | "color": "#7EB26D" 1254 | } 1255 | ], 1256 | "span": 6, 1257 | "stack": true, 1258 | "steppedLine": false, 1259 | "targets": [ 1260 | { 1261 | "expr": "node_memory_SwapTotal - node_memory_SwapFree", 1262 | "interval": "10s", 1263 | "intervalFactor": 1, 1264 | "legendFormat": "Used", 1265 | "refId": "A", 1266 | "step": 10 1267 | }, 1268 | { 1269 | "expr": "node_memory_SwapFree", 1270 | "interval": "10s", 1271 | "intervalFactor": 1, 1272 | "legendFormat": "Free", 1273 | "refId": "B", 1274 | "step": 10 1275 | } 1276 | ], 1277 | "timeFrom": null, 1278 | "timeShift": null, 1279 | "title": "Swap Usage", 1280 | "tooltip": { 1281 | "msResolution": true, 1282 | "shared": true, 1283 | "sort": 2, 1284 | "value_type": "individual" 1285 | }, 1286 | "type": "graph", 1287 | "xaxis": { 1288 | "show": true 1289 | }, 1290 | "yaxes": [ 1291 | { 1292 | "format": "bytes", 1293 | "label": null, 1294 | "logBase": 1, 1295 | "max": null, 1296 | "min": 0, 1297 | "show": true 1298 | }, 1299 | { 1300 | "format": "short", 1301 | "label": null, 1302 | "logBase": 1, 1303 | "max": null, 1304 | "min": null, 1305 | "show": false 1306 | } 1307 | ] 1308 | }, 1309 | { 1310 | "aliasColors": {}, 1311 | "bars": false, 1312 | "datasource": "Prometheus", 1313 | "decimals": 2, 1314 | "editable": true, 1315 | "error": false, 1316 | "fill": 1, 1317 | "grid": { 1318 | "threshold1": null, 1319 | "threshold1Color": "rgba(216, 200, 27, 0.27)", 1320 | "threshold2": null, 1321 | "threshold2Color": "rgba(234, 112, 112, 0.22)" 1322 | }, 1323 | "id": 15, 1324 | "isNew": true, 1325 | "legend": { 1326 | "alignAsTable": true, 1327 | "avg": true, 1328 | "current": false, 1329 | "max": true, 1330 | "min": true, 1331 | "show": true, 1332 | "total": false, 1333 | "values": true 1334 | }, 1335 | "lines": true, 1336 | "linewidth": 2, 1337 | "links": [], 1338 | "nullPointMode": "connected", 1339 | "percentage": false, 1340 | "pointradius": 5, 1341 | "points": false, 1342 | "renderer": "flot", 1343 | "seriesOverrides": [], 1344 | "span": 6, 1345 | "stack": false, 1346 | "steppedLine": false, 1347 | "targets": [ 1348 | { 1349 | "expr": "rate(node_vmstat_pswpin[1m]) * 4096 or irate(node_vmstat_pswpin[5m]) * 4096", 1350 | "interval": "10s", 1351 | "intervalFactor": 1, 1352 | "legendFormat": "In", 1353 | "refId": "A", 1354 | "step": 10 1355 | }, 1356 | { 1357 | "expr": "rate(node_vmstat_pswpout[1m]) * 4096 or irate(node_vmstat_pswpout[5m]) * 4096", 1358 | "interval": "10s", 1359 | "intervalFactor": 1, 1360 | "legendFormat": "Out", 1361 | "refId": "B", 1362 | "step": 10 1363 | } 1364 | ], 1365 | "timeFrom": null, 1366 | "timeShift": null, 1367 | "title": "Swap I/O", 1368 | "tooltip": { 1369 | "msResolution": true, 1370 | "shared": true, 1371 | "sort": 0, 1372 | "value_type": "cumulative" 1373 | }, 1374 | "type": "graph", 1375 | "xaxis": { 1376 | "show": true 1377 | }, 1378 | "yaxes": [ 1379 | { 1380 | "format": "Bps", 1381 | "label": null, 1382 | "logBase": 1, 1383 | "max": null, 1384 | "min": 0, 1385 | "show": true 1386 | }, 1387 | { 1388 | "format": "short", 1389 | "label": null, 1390 | "logBase": 1, 1391 | "max": null, 1392 | "min": null, 1393 | "show": false 1394 | } 1395 | ] 1396 | } 1397 | ], 1398 | "title": "New row" 1399 | } 1400 | ], 1401 | "time": { 1402 | "from": "now-15m", 1403 | "to": "now" 1404 | }, 1405 | "timepicker": { 1406 | "refresh_intervals": [ 1407 | "5s", 1408 | "10s", 1409 | "30s", 1410 | "1m", 1411 | "5m", 1412 | "15m", 1413 | "30m", 1414 | "1h", 1415 | "2h", 1416 | "1d" 1417 | ], 1418 | "time_options": [ 1419 | "5m", 1420 | "15m", 1421 | "1h", 1422 | "6h", 1423 | "12h", 1424 | "24h", 1425 | "2d", 1426 | "7d", 1427 | "30d" 1428 | ] 1429 | }, 1430 | "templating": { 1431 | "list": [] 1432 | }, 1433 | "annotations": { 1434 | "list": [] 1435 | }, 1436 | "refresh": "10s", 1437 | "schemaVersion": 12, 1438 | "version": 2, 1439 | "links": [], 1440 | "gnetId": null 1441 | } 1442 | --------------------------------------------------------------------------------