From 742fc9ab94ede1187c9146e5336e28fe84d510c5 Mon Sep 17 00:00:00 2001 From: Yang Yu Date: Wed, 2 May 2018 12:14:49 +0800 Subject: Style-check for monitoring scripts Fix the style-check errors for monitoring scripts. In another patch, the scripts will be restructured according the dicretory structure. Change-Id: I4149b18177fa1bdeb1b12a84ecad3d7d0b78260b Signed-off-by: Yang Yu --- monitor/automate_cadvisor_client.py | 26 +- monitor/automate_collectd_client.py | 33 +- monitor/automated-dashboard-datasource.py | 71 - monitor/automated_dashboard_datasource.py | 71 + monitor/barometer-collectd.conf | 174 -- monitor/barometer-install-script.sh | 5 - monitor/barometer_automated_client_install.py | 31 +- monitor/barometer_collectd.conf | 174 ++ monitor/barometer_install_client.sh | 4 +- monitor/barometer_install_script.sh | 5 + monitor/client_ip_configure.py | 10 +- monitor/custom-dashboard.py | 31 - monitor/custom-query-dashboard.json | 36 - monitor/custom_dashboard.py | 33 + monitor/custom_query_dashboard.json | 36 + .../grafana/dashboards/prometheus-system_rev1.json | 1905 -------------------- .../grafana/dashboards/prometheus_system_rev1.json | 1905 ++++++++++++++++++++ monitor/install-collectd-client.sh | 8 - monitor/install_collectd_client.sh | 8 + monitor/monitoring.sh | 6 +- monitor/server_ip_configure.py | 10 +- 21 files changed, 2300 insertions(+), 2282 deletions(-) delete mode 100644 monitor/automated-dashboard-datasource.py create mode 100644 monitor/automated_dashboard_datasource.py delete mode 100644 monitor/barometer-collectd.conf delete mode 100644 monitor/barometer-install-script.sh create mode 100644 monitor/barometer_collectd.conf create mode 100644 monitor/barometer_install_script.sh delete mode 100644 monitor/custom-dashboard.py delete mode 100644 monitor/custom-query-dashboard.json create mode 100644 monitor/custom_dashboard.py create mode 100644 monitor/custom_query_dashboard.json delete mode 100644 monitor/grafana/dashboards/prometheus-system_rev1.json create mode 100644 monitor/grafana/dashboards/prometheus_system_rev1.json delete mode 100644 monitor/install-collectd-client.sh create mode 100644 monitor/install_collectd_client.sh diff --git a/monitor/automate_cadvisor_client.py b/monitor/automate_cadvisor_client.py index 95b98e9d..f84892dd 100644 --- a/monitor/automate_cadvisor_client.py +++ b/monitor/automate_cadvisor_client.py @@ -8,30 +8,34 @@ ############################################################################## import logging -import sys import yaml -sys.path.insert(0, '/home/opnfv/bottlenecks/utils/infra_setup/passwordless_SSH/') -import ssh +import utils.infra_setup.passwordless_SSH.ssh as ssh logger = logging.getLogger(__name__) +cadvisor_install_sh = "/home/opnfv/bottlenecks/monitor/cadvisor_install.sh" + with open('/tmp/pod.yaml') as f: dataMap = yaml.safe_load(f) for x in dataMap: for y in dataMap[x]: - if (y['role']=='Controller') or (y['role']=='Compute'): + if (y['role'] == 'Controller') or (y['role'] == 'Compute'): ip = str(y['ip']) user = str(y['user']) pwd = str(y['password']) - ssh_d = ssh.SSH(user, host= ip, password= pwd) - status, stdout, stderr = ssh_d.execute("cd /etc && mkdir cadvisor-config") + ssh_d = ssh.SSH(user, host=ip, password=pwd) + status, stdout, stderr = ssh_d.execute( + "cd /etc && mkdir cadvisor_config" + ) if status: raise Exception("Command failed with non-zero status.") logger.info(stdout.splitlines()) - with open("/home/opnfv/bottlenecks/monitor/cadvisor_install.sh") as stdin_file: - ssh_d.run("cat > /etc/cadvisor-config/install.sh", stdin=stdin_file) - status, stdout, stderr = ssh_d.execute("sudo apt-get install docker.io") + with open(cadvisor_install_sh) as stdin_file: + ssh_d.run("cat > /etc/cadvisor_config/install.sh", + stdin=stdin_file) + status, stdout, stderr = ssh_d.execute( + "sudo apt-get install docker.io" + ) if status: raise Exception("Command for installing docker failed.") logger.info(stdout.splitlines()) - ssh_d.run("cd /etc/cadvisor-config/ && bash ./install.sh") - + ssh_d.run("cd /etc/cadvisor_config/ && bash ./install.sh") diff --git a/monitor/automate_collectd_client.py b/monitor/automate_collectd_client.py index 6dd70676..8358cfc5 100644 --- a/monitor/automate_collectd_client.py +++ b/monitor/automate_collectd_client.py @@ -8,31 +8,40 @@ ############################################################################## import logging -import sys import yaml -sys.path.insert(0, '/home/opnfv/bottlenecks/utils/infra_setup/passwordless_SSH/') -import ssh +import utils.infra_setup.passwordless_SSH.ssh as ssh logger = logging.getLogger(__name__) +collectd_client_install_sh =\ + "/home/opnfv/bottlenecks/monitor/install_collectd_client.sh" +collectd_client_install_conf =\ + "/home/opnfv/bottlenecks/monitor/config/collectd_client.conf" + with open('/tmp/pod.yaml') as f: dataMap = yaml.safe_load(f) for x in dataMap: for y in dataMap[x]: - if (y['role']=='Controller') or (y['role']=='Compute'): + if (y['role'] == 'Controller') or (y['role'] == 'Compute'): ip = str(y['ip']) user = str(y['user']) pwd = str(y['password']) - ssh_d = ssh.SSH(user, host= ip, password= pwd) - status, stdout, stderr = ssh_d.execute("cd /etc && mkdir collectd-config") + ssh_d = ssh.SSH(user, host=ip, password=pwd) + status, stdout, stderr = ssh_d.execute( + "cd /etc && mkdir collectd_config" + ) if status: raise Exception("Command failed with non-zero status.") logger.info(stdout.splitlines()) - with open("/home/opnfv/bottlenecks/monitor/install-collectd-client.sh") as stdin_file: - ssh_d.run("cat > /etc/collectd-config/install.sh", stdin=stdin_file) - with open("/home/opnfv/bottlenecks/monitor/config/collectd-client.conf") as stdin_file: - ssh_d.run("cat > /etc/collectd-config/collectd.conf", stdin=stdin_file) - status, stdout, stderr = ssh_d.execute("sudo apt-get install docker.io") + with open(collectd_client_install_sh) as stdin_file: + ssh_d.run("cat > /etc/collectd_config/install.sh", + stdin=stdin_file) + with open(collectd_client_install_conf) as stdin_file: + ssh_d.run("cat > /etc/collectd_config/collectd.conf", + stdin=stdin_file) + status, stdout, stderr = ssh_d.execute( + "sudo apt-get install docker.io" + ) if status: raise Exception("Command for installing docker failed.") logger.info(stdout.splitlines()) - ssh_d.run("cd /etc/collectd-config/ && bash ./install.sh") + ssh_d.run("cd /etc/collectd_config/ && bash ./install.sh") diff --git a/monitor/automated-dashboard-datasource.py b/monitor/automated-dashboard-datasource.py deleted file mode 100644 index 69f3ebe6..00000000 --- a/monitor/automated-dashboard-datasource.py +++ /dev/null @@ -1,71 +0,0 @@ -############################################################################## -# Copyright (c) 2017 Huawei Tech and others. -# -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 -############################################################################## - -import logging -import socket -import requests -from oslo_serialization import jsonutils - - -logger = logging.getLogger(__name__) - - -def _create_dashboard(ip, port, path): - url = 'http://admin:admin@{}:{}/api/dashboards/db'.format(ip, port) - logger.info("Fetched IP for dashboard creation!") - with open(path) as f: - data = jsonutils.load(f) - try: - post(url, {"dashboard": data}) - logger.info( "Trying to post dashboard json!") - except Exception: - logger.info("Create dashboard failed") - raise - - -def _create_data_source(ip, port): - url = 'http://admin:admin@{}:{}/api/datasources'.format(ip, port) - logger.info("Fetched URL for datasource") - data = { - "name": "automated-ds", - "type": "prometheus", - "access": "direct", - "url": "http://{}:9090".format(ip), - } - try: - post(url, data) - logger.info("Trying to post datasource") - - except Exception: - logger.info("Create Datasources failed") - raise - - -def post(url, data): - data = jsonutils.dump_as_bytes(data) - logger.info("In post method for dumping data") - headers = {'Content-Type': 'application/json'} - try: - response = requests.post(url, data=data, headers=headers) - result = response.json() - logger.debug('The result is: %s', result) - logger.info("Trying to post") - return result - except Exception as e: - logger.info("Failed post" + str(e)) - raise - - -ip_address = socket.gethostbyname(socket.gethostname()) -_create_data_source(ip_address, 3000) -_create_dashboard(ip_address, 3000, '/var/lib/grafana/' + - 'dashboards/' + - 'prometheus-system_rev1.json') -_create_dashboard(ip_address, 3000, - 'prototype_dashboard_collapsible.json') diff --git a/monitor/automated_dashboard_datasource.py b/monitor/automated_dashboard_datasource.py new file mode 100644 index 00000000..ee605049 --- /dev/null +++ b/monitor/automated_dashboard_datasource.py @@ -0,0 +1,71 @@ +############################################################################## +# Copyright (c) 2017 Huawei Tech and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +import logging +import socket +import requests +from oslo_serialization import jsonutils + + +logger = logging.getLogger(__name__) + + +def _create_dashboard(ip, port, path): + url = 'http://admin:admin@{}:{}/api/dashboards/db'.format(ip, port) + logger.info("Fetched IP for dashboard creation!") + with open(path) as f: + data = jsonutils.load(f) + try: + post(url, {"dashboard": data}) + logger.info("Trying to post dashboard json!") + except Exception: + logger.info("Create dashboard failed") + raise + + +def _create_data_source(ip, port): + url = 'http://admin:admin@{}:{}/api/datasources'.format(ip, port) + logger.info("Fetched URL for datasource") + data = { + "name": "automated-ds", + "type": "prometheus", + "access": "direct", + "url": "http://{}:9090".format(ip), + } + try: + post(url, data) + logger.info("Trying to post datasource") + + except Exception: + logger.info("Create Datasources failed") + raise + + +def post(url, data): + data = jsonutils.dump_as_bytes(data) + logger.info("In post method for dumping data") + headers = {'Content-Type': 'application/json'} + try: + response = requests.post(url, data=data, headers=headers) + result = response.json() + logger.debug('The result is: %s', result) + logger.info("Trying to post") + return result + except Exception as e: + logger.info("Failed post" + str(e)) + raise + + +ip_address = socket.gethostbyname(socket.gethostname()) +_create_data_source(ip_address, 3000) +_create_dashboard(ip_address, 3000, '/var/lib/grafana/' + + 'dashboards/' + + 'prometheus_system_rev1.json') +_create_dashboard(ip_address, 3000, + 'prototype_dashboard_collapsible.json') diff --git a/monitor/barometer-collectd.conf b/monitor/barometer-collectd.conf deleted file mode 100644 index ecb1261c..00000000 --- a/monitor/barometer-collectd.conf +++ /dev/null @@ -1,174 +0,0 @@ -# -# Config file for collectd(1). -# Please read collectd.conf(5) for a list of options. -# http://collectd.org/ -# - -############################################################################## -# Global # -#----------------------------------------------------------------------------# -# Global settings for the daemon. # -############################################################################## - -#Hostname "localhost" -#FQDNLookup true -#BaseDir "${prefix}/var/lib/collectd" -#PIDFile "${prefix}/var/run/collectd.pid" -#PluginDir "${exec_prefix}/lib/collectd" -#TypesDB "/opt/collectd/share/collectd/types.db" - -#----------------------------------------------------------------------------# -# When enabled, plugins are loaded automatically with the default options # -# when an appropriate block is encountered. # -# Disabled by default. # -#----------------------------------------------------------------------------# -#AutoLoadPlugin false - -#----------------------------------------------------------------------------# -# When enabled, internal statistics are collected, using "collectd" as the # -# plugin name. # -# Disabled by default. # -#----------------------------------------------------------------------------# -#CollectInternalStats false - -#----------------------------------------------------------------------------# -# Interval at which to query values. This may be overwritten on a per-plugin # -# base by using the 'Interval' option of the LoadPlugin block: # -# # -# Interval 60 # -# # -#----------------------------------------------------------------------------# -#Interval 10 - -#MaxReadInterval 86400 -#Timeout 2 -#ReadThreads 5 -#WriteThreads 5 - -# Limit the size of the write queue. Default is no limit. Setting up a limit is -# recommended for servers handling a high volume of traffic. -#WriteQueueLimitHigh 1000000 -#WriteQueueLimitLow 800000 - -############################################################################## -# Logging # -#----------------------------------------------------------------------------# -# Plugins which provide logging functions should be loaded first, so log # -# messages generated when loading or configuring other plugins can be # -# accessed. # -############################################################################## - -LoadPlugin syslog -#LoadPlugin logfile -#LoadPlugin log_logstash - -# -# LogLevel info -# File STDOUT -# Timestamp true -# PrintSeverity false -# - -# -# LogLevel info -# File "${prefix}/var/log/collectd.json.log" -# - -# -# LogLevel info -# - -############################################################################## -# LoadPlugin section # -#----------------------------------------------------------------------------# -# Lines beginning with a single `#' belong to plugins which have been built # -# but are disabled by default. # -# # -# Lines beginning with `##' belong to plugins which have not been built due # -# to missing dependencies or because they have been deactivated explicitly. # -############################################################################## - -##LoadPlugin barometer -LoadPlugin cpu -LoadPlugin interface -LoadPlugin load -LoadPlugin memory -LoadPlugin network -LoadPlugin ovs_events -LoadPlugin ovs_stats -LoadPlugin rrdtool -LoadPlugin write_http - -############################################################################## -# Plugin configuration # -#----------------------------------------------------------------------------# -# In this section configuration stubs for each plugin are provided. A desc- # -# ription of those options is available in the collectd.conf(5) manual page. # -############################################################################## - -# -# Device "/dev/i2c-0"; -# Oversampling 512 -# PressureOffset 0.0 -# TemperatureOffset 0.0 -# Normalization 2 -# Altitude 238.0 -# TemperatureSensor "myserver/onewire-F10FCA000800/temperature" -# - -# -# ReportByCpu true -# ReportByState true -# ValuesPercentage false -# ReportNumCpu false -# ReportGuestState false -# SubtractGuestState true -# - -# -# Interface "eth0" -# IgnoreSelected false -# ReportInactive true -# UniqueName false -# - -# -# -# #Host "memcache.example.com" -# Address "127.0.0.1" -# Port "11211" -# -# - -# -# ValuesAbsolute true -# ValuesPercentage false -# - - - Listen "192.168.121.2" "25826" - - - - Port "6640" - Address "127.0.0.1" - Socket "/var/run/openvswitch/db.sock" - Interfaces "br0" "veth0" - SendNotification true - DispatchValues false - - - - Port "6640" - Address "127.0.0.1" - Socket "/var/run/openvswitch/db.sock" - Bridges "br0" "br_ext" - - - - - URL "http://192.168.121.2:9103/collectd-post" - Format "JSON" - StoreRates false - - diff --git a/monitor/barometer-install-script.sh b/monitor/barometer-install-script.sh deleted file mode 100644 index 9dc20093..00000000 --- a/monitor/barometer-install-script.sh +++ /dev/null @@ -1,5 +0,0 @@ -docker pull opnfv/barometer -sudo docker run --name bottlenecks-barometer-server -tid --net=host -v `pwd`/../src/collectd_sample_configs:/opt/collectd/etc/collectd.conf.d \ --v /home/opnfv/bottlenecks/monitor/barometer-collectd.conf:/src/barometer/src/collectd/collectd/src/collectd.conf \ --v /etc/barometer-config/barometer_client_collectd.conf:/opt/collectd/etc/collectd.conf \ --v /var/run:/var/run -v /tmp:/tmp --privileged opnfv/barometer /run_collectd.sh diff --git a/monitor/barometer_automated_client_install.py b/monitor/barometer_automated_client_install.py index 7bbfa701..9bb2c6b1 100644 --- a/monitor/barometer_automated_client_install.py +++ b/monitor/barometer_automated_client_install.py @@ -8,29 +8,36 @@ ############################################################################## import logging -import sys import yaml -sys.path.insert(0, '/home/opnfv/bottlenecks/utils/infra_setup/passwordless_SSH/') -import ssh +import utils.infra_setup.passwordless_SSH.ssh as ssh logger = logging.getLogger(__name__) +barometer_client_install_sh =\ + "/home/opnfv/bottlenecks/monitor/barometer_install_client.sh" +barometer_client_install_conf =\ + "/home/opnfv/bottlenecks/monitor/barometer_client.conf" + with open('/tmp/pod.yaml') as f: dataMap = yaml.safe_load(f) for x in dataMap: for y in dataMap[x]: - if (y['role']=='Controller') or (y['role']=='Compute'): + if (y['role'] == 'Controller') or (y['role'] == 'Compute'): ip = str(y['ip']) user = str(y['user']) pwd = str(y['password']) - ssh_d = ssh.SSH(user, host= ip, password= pwd) - status, stdout, stderr = ssh_d.execute("cd /etc && mkdir barometer-config") + ssh_d = ssh.SSH(user, host=ip, password=pwd) + status, stdout, stderr = ssh_d.execute( + "cd /etc && mkdir barometer_config" + ) if status: raise Exception("Command failed with non-zero status.") logger.info(stdout.splitlines()) - with open("/home/opnfv/bottlenecks/monitor/barometer_client.conf") as stdin_file: - ssh_d.run("cat > /etc/barometer-config/barometer_client_collectd.conf", stdin=stdin_file) - - with open("/home/opnfv/bottlenecks/monitor/barometer_install_client.sh") as stdin_file: - ssh_d.run("cat > /etc/barometer-config/install.sh", stdin=stdin_file) + with open(barometer_client_install_conf) as stdin_file: + ssh_d.run("cat > /etc/barometer_config/\ + barometer_client_collectd.conf", + stdin=stdin_file) + with open(barometer_client_install_sh) as stdin_file: + ssh_d.run("cat > /etc/barometer_config/install.sh", + stdin=stdin_file) - ssh_d.run("cd /etc/barometer-config/ && bash ./install.sh") + ssh_d.run("cd /etc/barometer_config/ && bash ./install.sh") diff --git a/monitor/barometer_collectd.conf b/monitor/barometer_collectd.conf new file mode 100644 index 00000000..ecb1261c --- /dev/null +++ b/monitor/barometer_collectd.conf @@ -0,0 +1,174 @@ +# +# Config file for collectd(1). +# Please read collectd.conf(5) for a list of options. +# http://collectd.org/ +# + +############################################################################## +# Global # +#----------------------------------------------------------------------------# +# Global settings for the daemon. # +############################################################################## + +#Hostname "localhost" +#FQDNLookup true +#BaseDir "${prefix}/var/lib/collectd" +#PIDFile "${prefix}/var/run/collectd.pid" +#PluginDir "${exec_prefix}/lib/collectd" +#TypesDB "/opt/collectd/share/collectd/types.db" + +#----------------------------------------------------------------------------# +# When enabled, plugins are loaded automatically with the default options # +# when an appropriate block is encountered. # +# Disabled by default. # +#----------------------------------------------------------------------------# +#AutoLoadPlugin false + +#----------------------------------------------------------------------------# +# When enabled, internal statistics are collected, using "collectd" as the # +# plugin name. # +# Disabled by default. # +#----------------------------------------------------------------------------# +#CollectInternalStats false + +#----------------------------------------------------------------------------# +# Interval at which to query values. This may be overwritten on a per-plugin # +# base by using the 'Interval' option of the LoadPlugin block: # +# # +# Interval 60 # +# # +#----------------------------------------------------------------------------# +#Interval 10 + +#MaxReadInterval 86400 +#Timeout 2 +#ReadThreads 5 +#WriteThreads 5 + +# Limit the size of the write queue. Default is no limit. Setting up a limit is +# recommended for servers handling a high volume of traffic. +#WriteQueueLimitHigh 1000000 +#WriteQueueLimitLow 800000 + +############################################################################## +# Logging # +#----------------------------------------------------------------------------# +# Plugins which provide logging functions should be loaded first, so log # +# messages generated when loading or configuring other plugins can be # +# accessed. # +############################################################################## + +LoadPlugin syslog +#LoadPlugin logfile +#LoadPlugin log_logstash + +# +# LogLevel info +# File STDOUT +# Timestamp true +# PrintSeverity false +# + +# +# LogLevel info +# File "${prefix}/var/log/collectd.json.log" +# + +# +# LogLevel info +# + +############################################################################## +# LoadPlugin section # +#----------------------------------------------------------------------------# +# Lines beginning with a single `#' belong to plugins which have been built # +# but are disabled by default. # +# # +# Lines beginning with `##' belong to plugins which have not been built due # +# to missing dependencies or because they have been deactivated explicitly. # +############################################################################## + +##LoadPlugin barometer +LoadPlugin cpu +LoadPlugin interface +LoadPlugin load +LoadPlugin memory +LoadPlugin network +LoadPlugin ovs_events +LoadPlugin ovs_stats +LoadPlugin rrdtool +LoadPlugin write_http + +############################################################################## +# Plugin configuration # +#----------------------------------------------------------------------------# +# In this section configuration stubs for each plugin are provided. A desc- # +# ription of those options is available in the collectd.conf(5) manual page. # +############################################################################## + +# +# Device "/dev/i2c-0"; +# Oversampling 512 +# PressureOffset 0.0 +# TemperatureOffset 0.0 +# Normalization 2 +# Altitude 238.0 +# TemperatureSensor "myserver/onewire-F10FCA000800/temperature" +# + +# +# ReportByCpu true +# ReportByState true +# ValuesPercentage false +# ReportNumCpu false +# ReportGuestState false +# SubtractGuestState true +# + +# +# Interface "eth0" +# IgnoreSelected false +# ReportInactive true +# UniqueName false +# + +# +# +# #Host "memcache.example.com" +# Address "127.0.0.1" +# Port "11211" +# +# + +# +# ValuesAbsolute true +# ValuesPercentage false +# + + + Listen "192.168.121.2" "25826" + + + + Port "6640" + Address "127.0.0.1" + Socket "/var/run/openvswitch/db.sock" + Interfaces "br0" "veth0" + SendNotification true + DispatchValues false + + + + Port "6640" + Address "127.0.0.1" + Socket "/var/run/openvswitch/db.sock" + Bridges "br0" "br_ext" + + + + + URL "http://192.168.121.2:9103/collectd-post" + Format "JSON" + StoreRates false + + diff --git a/monitor/barometer_install_client.sh b/monitor/barometer_install_client.sh index d75adf1a..2bf6cd8d 100644 --- a/monitor/barometer_install_client.sh +++ b/monitor/barometer_install_client.sh @@ -1,5 +1,5 @@ docker pull opnfv/barometer sudo docker run --name bottlenecks-barometer-client -tid --net=host -v `pwd`/../src/collectd_sample_configs:/opt/collectd/etc/collectd.conf.d \ --v /etc/barometer-config/barometer_client_collectd.conf:/src/barometer/src/collectd/collectd/src/collectd.conf \ --v /etc/barometer-config/barometer_client_collectd.conf:/opt/collectd/etc/collectd.conf \ +-v /etc/barometer_config/barometer_client_collectd.conf:/src/barometer/src/collectd/collectd/src/collectd.conf \ +-v /etc/barometer_config/barometer_client_collectd.conf:/opt/collectd/etc/collectd.conf \ -v /var/run:/var/run -v /tmp:/tmp --privileged opnfv/barometer /run_collectd.sh diff --git a/monitor/barometer_install_script.sh b/monitor/barometer_install_script.sh new file mode 100644 index 00000000..b0abbb90 --- /dev/null +++ b/monitor/barometer_install_script.sh @@ -0,0 +1,5 @@ +docker pull opnfv/barometer +sudo docker run --name bottlenecks-barometer-server -tid --net=host -v `pwd`/../src/collectd_sample_configs:/opt/collectd/etc/collectd.conf.d \ +-v /home/opnfv/bottlenecks/monitor/barometer_collectd.conf:/src/barometer/src/collectd/collectd/src/collectd.conf \ +-v /etc/barometer_config/barometer_client_collectd.conf:/opt/collectd/etc/collectd.conf \ +-v /var/run:/var/run -v /tmp:/tmp --privileged opnfv/barometer /run_collectd.sh diff --git a/monitor/client_ip_configure.py b/monitor/client_ip_configure.py index 9bfb12ce..2a66f7b2 100644 --- a/monitor/client_ip_configure.py +++ b/monitor/client_ip_configure.py @@ -10,18 +10,16 @@ import fileinput import re import logging import socket -import requests -from oslo_serialization import jsonutils logger = logging.getLogger(__name__) ip_address = socket.gethostbyname(socket.gethostname()) for line in fileinput.input(inplace=1): - ip = " Server \"" + str(ip_address) +"\" \"25826\"" - line = re.sub(r'.*Server.*25826.*', r''+str(ip), line.rstrip()) + ip = " Server \"" + str(ip_address) + "\" \"25826\"" + line = re.sub(r'.*Server.*25826.*', r'' + str(ip), line.rstrip()) print(line) for line in fileinput.input(inplace=1): - ip = " URL \"http://"+str(ip_address)+":9103/collectd-post\"" - line = re.sub(r'.*URL.*collectd-post.*', r''+str(ip), line.rstrip()) + ip = " URL \"http://" + str(ip_address) + ":9103/collectd-post\"" + line = re.sub(r'.*URL.*collectd-post.*', r'' + str(ip), line.rstrip()) print(line) diff --git a/monitor/custom-dashboard.py b/monitor/custom-dashboard.py deleted file mode 100644 index 48173f8e..00000000 --- a/monitor/custom-dashboard.py +++ /dev/null @@ -1,31 +0,0 @@ -############################################################################## -# Copyright (c) 2018 Huawei Tech and others. -# -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 -############################################################################## - -import json - -def customize_query(filename, rowtitle, panelname, expr): - with open(filename, 'r+') as f: - data = json.load(f) - x = data['rows'] #this is an array of the rows of the dashboard - for y in x: - if y['title'] == rowtitle: - pan = y['panels'] - for i in range(len(pan)-1) : - z = pan[i] - if z['title'] == panelname: - tar = z['targets'] - for a in tar: - a['expr'] = expr - f.seek(0) # <--- reset file position to start - json.dump(data, f, indent=4) - f.truncate() - -customize_query("/home/opnfv/bottlenecks/monitor/custom-query-dashboard.json", - "Dashboard Row", "Memory Usage per Container", "Sample Prometheus Query") - diff --git a/monitor/custom-query-dashboard.json b/monitor/custom-query-dashboard.json deleted file mode 100644 index 7f2e53a3..00000000 --- a/monitor/custom-query-dashboard.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "rows": [ - { - "repeat": null, - "titleSize": "h6", - "repeatIteration": null, - "title": "Dashboard Row", - "height": 150, - "repeatRowId": null, - "panels": [ - { - "title": "Memory Usage per Container", - "aliasColors": {}, - "id": 31, - "cacheTimeout": null, - "valueName": "current", - "targets": [ - { - "hide": false, - "expr": "Sample Prometheus Query", - "step": 1800, - "legendFormat": "", - "intervalFactor": 2, - "refId": "A" - } - ] - }, - { - "content": "Sample Content" - } - ], - "showTitle": false, - "collapse": true - } - ] -} diff --git a/monitor/custom_dashboard.py b/monitor/custom_dashboard.py new file mode 100644 index 00000000..2a4f79cf --- /dev/null +++ b/monitor/custom_dashboard.py @@ -0,0 +1,33 @@ +############################################################################## +# Copyright (c) 2018 Huawei Tech and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +import json + + +def customize_query(filename, rowtitle, panelname, expr): + with open(filename, 'r+') as f: + data = json.load(f) + x = data['rows'] # this is an array of the rows of the dashboard + for y in x: + if y['title'] == rowtitle: + pan = y['panels'] + for i in range(len(pan) - 1): + z = pan[i] + if z['title'] == panelname: + tar = z['targets'] + for a in tar: + a['expr'] = expr + f.seek(0) # <--- reset file position to start + json.dump(data, f, indent=4) + f.truncate() + + +customize_query("/home/opnfv/bottlenecks/monitor/custom-query-dashboard.json", + "Dashboard Row", "Memory Usage per Container", + "Sample Prometheus Query") diff --git a/monitor/custom_query_dashboard.json b/monitor/custom_query_dashboard.json new file mode 100644 index 00000000..7f2e53a3 --- /dev/null +++ b/monitor/custom_query_dashboard.json @@ -0,0 +1,36 @@ +{ + "rows": [ + { + "repeat": null, + "titleSize": "h6", + "repeatIteration": null, + "title": "Dashboard Row", + "height": 150, + "repeatRowId": null, + "panels": [ + { + "title": "Memory Usage per Container", + "aliasColors": {}, + "id": 31, + "cacheTimeout": null, + "valueName": "current", + "targets": [ + { + "hide": false, + "expr": "Sample Prometheus Query", + "step": 1800, + "legendFormat": "", + "intervalFactor": 2, + "refId": "A" + } + ] + }, + { + "content": "Sample Content" + } + ], + "showTitle": false, + "collapse": true + } + ] +} diff --git a/monitor/grafana/dashboards/prometheus-system_rev1.json b/monitor/grafana/dashboards/prometheus-system_rev1.json deleted file mode 100644 index 99e98b4f..00000000 --- a/monitor/grafana/dashboards/prometheus-system_rev1.json +++ /dev/null @@ -1,1905 +0,0 @@ -{ - "__inputs": [ - { - "name": "DS_PROMETHEUS", - "label": "Prometheus", - "description": "", - "type": "datasource", - "pluginId": "prometheus", - "pluginName": "Prometheus" - } - ], - "__requires": [ - { - "type": "panel", - "id": "singlestat", - "name": "Singlestat", - "version": "" - }, - { - "type": "panel", - "id": "graph", - "name": "Graph", - "version": "" - }, - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "3.1.0" - }, - { - "type": "datasource", - "id": "prometheus", - "name": "Prometheus", - "version": "1.0.0" - } - ], - "id": null, - "title": "Prometheus system", - "tags": [ - "system", - "prometheus", - "online", - "home" - ], - "style": "dark", - "timezone": "browser", - "editable": true, - "hideControls": false, - "sharedCrosshair": true, - "rows": [ - { - "collapse": false, - "editable": true, - "height": "250px", - "panels": [ - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": true, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "datasource": "${DS_PROMETHEUS}", - "decimals": 1, - "editable": true, - "error": false, - "format": "s", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "height": "50px", - "id": 19, - "interval": null, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "s", - "postfixFontSize": "80%", - "prefix": "", - "prefixFontSize": "80%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "span": 3, - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false - }, - "targets": [ - { - "calculatedInterval": "10m", - "datasourceErrors": {}, - "errors": {}, - "expr": "node_time{alias=\"$host\"} - node_boot_time{alias=\"$host\"}", - "interval": "5m", - "intervalFactor": 1, - "legendFormat": "", - "metric": "", - "prometheusLink": "/api/datasources/proxy/1/graph#%5B%7B%22expr%22%3A%22node_time%7Balias%3D%5C%22%24host%5C%22%7D%20-%20node_boot_time%7Balias%3D%5C%22%24host%5C%22%7D%22%2C%22range_input%22%3A%2243200s%22%2C%22end_input%22%3A%222015-9-18%2013%3A25%22%2C%22step_input%22%3A%22%22%2C%22tab%22%3A0%7D%5D", - "refId": "A", - "step": 300 - } - ], - "thresholds": "300,3600", - "title": "System Uptime", - "transparent": false, - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [], - "valueName": "current" - }, - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "datasource": "${DS_PROMETHEUS}", - "editable": true, - "error": false, - "format": "none", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "height": "55px", - "id": 25, - "interval": null, - "isNew": true, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "80%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "span": 3, - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false - }, - "targets": [ - { - "expr": "count(node_cpu{mode=\"user\", alias=\"$host\"})", - "interval": "5m", - "intervalFactor": 1, - "refId": "A", - "step": 300 - } - ], - "thresholds": "", - "title": "Virtual CPUs", - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "current" - }, - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "datasource": "${DS_PROMETHEUS}", - "decimals": 2, - "editable": true, - "error": false, - "format": "bytes", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "height": "55px", - "id": 26, - "interval": null, - "isNew": true, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "80%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "span": 3, - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false - }, - "targets": [ - { - "expr": "node_memory_MemAvailable{alias=\"$host\"}", - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "metric": "node_memory_MemAvailable", - "refId": "A", - "step": 30 - } - ], - "thresholds": "", - "title": "RAM available", - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "current" - }, - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": true, - "colors": [ - "rgba(50, 172, 45, 0.97)", - "rgba(237, 129, 40, 0.89)", - "rgba(245, 54, 54, 0.9)" - ], - "datasource": "${DS_PROMETHEUS}", - "decimals": 0, - "editable": true, - "error": false, - "format": "percent", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "height": "50px", - "id": 9, - "interval": null, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "80%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "span": 3, - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": true, - "lineColor": "rgb(31, 120, 193)", - "show": true - }, - "targets": [ - { - "calculatedInterval": "10m", - "datasourceErrors": {}, - "errors": {}, - "expr": "(node_memory_MemAvailable{alias=\"$host\"} or (node_memory_MemFree{alias=\"$host\"} + node_memory_Buffers{alias=\"$host\"} + node_memory_Cached{alias=\"$host\"})) / node_memory_MemTotal{alias=\"$host\"} * 100", - "interval": "5m", - "intervalFactor": 1, - "legendFormat": "", - "metric": "node_mem", - "prometheusLink": "/api/datasources/proxy/1/graph#%5B%7B%22expr%22%3A%22(node_memory_MemFree%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Buffers%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Cached%7Balias%3D%5C%22%24host%5C%22%7D)%20%2F%20node_memory_MemTotal%7Balias%3D%5C%22%24host%5C%22%7D%20*%20100%22%2C%22range_input%22%3A%2243201s%22%2C%22end_input%22%3A%222015-9-15%2013%3A54%22%2C%22step_input%22%3A%22%22%2C%22tab%22%3A0%7D%5D", - "refId": "A", - "step": 300 - } - ], - "thresholds": "90,95", - "title": "Memory Available", - "transparent": false, - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [], - "valueName": "current" - }, - { - "aliasColors": {}, - "bars": false, - "datasource": "${DS_PROMETHEUS}", - "decimals": 2, - "editable": true, - "error": false, - "fill": 6, - "grid": { - "threshold1": null, - "threshold1Color": "rgba(216, 200, 27, 0.27)", - "threshold2": null, - "threshold2Color": "rgba(234, 112, 112, 0.22)", - "thresholdLine": false - }, - "height": "260px", - "id": 2, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "hideEmpty": false, - "max": true, - "min": true, - "rightSide": true, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "span": 12, - "stack": true, - "steppedLine": false, - "targets": [ - { - "calculatedInterval": "2s", - "datasourceErrors": {}, - "errors": {}, - "expr": "sum(rate(node_cpu{alias=\"$host\"}[$interval])) by (mode) * 100 / count_scalar(node_cpu{mode=\"user\", alias=\"$host\"}) or sum(irate(node_cpu{alias=\"$host\"}[5m])) by (mode) * 100 / count_scalar(node_cpu{mode=\"user\", alias=\"$host\"})", - "intervalFactor": 1, - "legendFormat": "{{ mode }}", - "metric": "", - "prometheusLink": "/api/datasources/proxy/1/graph#%5B%7B%22expr%22%3A%22sum(rate(node_cpu%7Balias%3D%5C%22%24host%5C%22%7D%5B%24interval%5D))%20by%20(mode)%20*%20100%22%2C%22range_input%22%3A%223600s%22%2C%22end_input%22%3A%222015-10-22%2015%3A27%22%2C%22step_input%22%3A%22%22%2C%22stacked%22%3Atrue%2C%22tab%22%3A0%7D%5D", - "refId": "A", - "step": 2 - } - ], - "timeFrom": null, - "timeShift": null, - "title": "CPU Usage", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "show": true - }, - "yaxes": [ - { - "format": "percent", - "label": "", - "logBase": 1, - "max": 100, - "min": 0, - "show": true - }, - { - "format": "short", - "logBase": 1, - "max": null, - "min": 0, - "show": true - } - ] - }, - { - "aliasColors": {}, - "bars": false, - "datasource": "${DS_PROMETHEUS}", - "decimals": 2, - "editable": true, - "error": false, - "fill": 2, - "grid": { - "threshold1": null, - "threshold1Color": "rgb(241, 156, 15)", - "threshold2": null, - "threshold2Color": "rgb(246, 17, 17)", - "thresholdLine": true - }, - "id": 18, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "hideEmpty": false, - "max": true, - "min": true, - "rightSide": true, - "show": true, - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "Load 1m", - "color": "#E24D42" - }, - { - "alias": "Load 5m", - "color": "#E0752D" - }, - { - "alias": "Load 15m", - "color": "#E5AC0E" - } - ], - "span": 12, - "stack": false, - "steppedLine": false, - "targets": [ - { - "calculatedInterval": "10s", - "datasourceErrors": {}, - "errors": {}, - "expr": "node_load1{alias=\"$host\"}", - "intervalFactor": 1, - "legendFormat": "Load 1m", - "metric": "", - "prometheusLink": "/api/datasources/proxy/1/graph#%5B%7B%22expr%22%3A%22node_load1%7Balias%3D%5C%22%24host%5C%22%7D%22%2C%22range_input%22%3A%223601s%22%2C%22end_input%22%3A%222015-10-22%2015%3A27%22%2C%22step_input%22%3A%22%22%2C%22stacked%22%3Afalse%2C%22tab%22%3A0%7D%5D", - "refId": "A", - "step": 2, - "target": "" - }, - { - "calculatedInterval": "10s", - "datasourceErrors": {}, - "errors": {}, - "expr": "node_load5{alias=\"$host\"}", - "intervalFactor": 1, - "legendFormat": "Load 5m", - "metric": "", - "prometheusLink": "/api/datasources/proxy/1/graph#%5B%7B%22expr%22%3A%22node_load5%7Balias%3D%5C%22%24host%5C%22%7D%22%2C%22range_input%22%3A%223600s%22%2C%22end_input%22%3A%222015-10-22%2015%3A27%22%2C%22step_input%22%3A%22%22%2C%22stacked%22%3Afalse%2C%22tab%22%3A0%7D%5D", - "refId": "B", - "step": 2, - "target": "" - }, - { - "calculatedInterval": "10s", - "datasourceErrors": {}, - "errors": {}, - "expr": "node_load15{alias=\"$host\"}", - "intervalFactor": 1, - "legendFormat": "Load 15m", - "metric": "", - "prometheusLink": "/api/datasources/proxy/1/graph#%5B%7B%22expr%22%3A%22node_load15%7Balias%3D%5C%22%24host%5C%22%7D%22%2C%22range_input%22%3A%223600s%22%2C%22end_input%22%3A%222015-10-22%2015%3A27%22%2C%22step_input%22%3A%22%22%2C%22stacked%22%3Afalse%2C%22tab%22%3A0%7D%5D", - "refId": "C", - "step": 2, - "target": "" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Load Average", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "transparent": false, - "type": "graph", - "xaxis": { - "show": true - }, - "yaxes": [ - { - "format": "none", - "label": "", - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "none", - "logBase": 1, - "max": null, - "min": 0, - "show": true - } - ] - } - ], - "showTitle": false, - "title": "System Stats" - }, - { - "collapse": false, - "editable": true, - "height": "300px", - "panels": [ - { - "aliasColors": {}, - "bars": false, - "datasource": "${DS_PROMETHEUS}", - "decimals": 2, - "editable": true, - "error": false, - "fill": 6, - "grid": { - "threshold1": null, - "threshold1Color": "rgba(216, 200, 27, 0.27)", - "threshold2": null, - "threshold2Color": "rgba(234, 112, 112, 0.22)", - "thresholdLine": false - }, - "height": "", - "id": 6, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "hideEmpty": false, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "Used", - "color": "#0A437C" - }, - { - "alias": "Available", - "color": "#5195CE" - }, - { - "alias": "Total", - "color": "#052B51", - "legend": false, - "stack": false - } - ], - "span": 6, - "stack": true, - "steppedLine": false, - "targets": [ - { - "calculatedInterval": "2s", - "datasourceErrors": {}, - "errors": {}, - "expr": "node_memory_MemTotal{alias=\"$host\"}", - "intervalFactor": 1, - "legendFormat": "Total", - "metric": "", - "prometheusLink": "/api/datasources/proxy/1/graph#%5B%7B%22expr%22%3A%22node_memory_MemFree%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Buffers%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Cached%7Balias%3D%5C%22%24host%5C%22%7D%22%2C%22range_input%22%3A%22900s%22%2C%22end_input%22%3A%222015-10-22%2015%3A25%22%2C%22step_input%22%3A%22%22%2C%22stacked%22%3Atrue%2C%22tab%22%3A0%7D%5D", - "refId": "C", - "step": 5, - "target": "" - }, - { - "calculatedInterval": "2s", - "datasourceErrors": {}, - "errors": {}, - "expr": "node_memory_MemTotal{alias=\"$host\"} - (node_memory_MemAvailable{alias=\"$host\"} or (node_memory_MemFree{alias=\"$host\"} + node_memory_Buffers{alias=\"$host\"} + node_memory_Cached{alias=\"$host\"}))", - "intervalFactor": 1, - "legendFormat": "Used", - "metric": "", - "prometheusLink": "/api/datasources/proxy/1/graph#%5B%7B%22expr%22%3A%22node_memory_MemTotal%7Balias%3D%5C%22%24host%5C%22%7D%20-%20(node_memory_MemFree%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Buffers%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Cached%7Balias%3D%5C%22%24host%5C%22%7D)%22%2C%22range_input%22%3A%22900s%22%2C%22end_input%22%3A%222015-10-22%2015%3A25%22%2C%22step_input%22%3A%22%22%2C%22stacked%22%3Atrue%2C%22tab%22%3A0%7D%5D", - "refId": "A", - "step": 5, - "target": "" - }, - { - "calculatedInterval": "2s", - "datasourceErrors": {}, - "errors": {}, - "expr": "node_memory_MemAvailable{alias=\"$host\"} or (node_memory_MemFree{alias=\"$host\"} + node_memory_Buffers{alias=\"$host\"} + node_memory_Cached{alias=\"$host\"})", - "intervalFactor": 1, - "legendFormat": "Available", - "metric": "", - "prometheusLink": "/api/datasources/proxy/1/graph#%5B%7B%22expr%22%3A%22node_memory_MemFree%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Buffers%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Cached%7Balias%3D%5C%22%24host%5C%22%7D%22%2C%22range_input%22%3A%22900s%22%2C%22end_input%22%3A%222015-10-22%2015%3A25%22%2C%22step_input%22%3A%22%22%2C%22stacked%22%3Atrue%2C%22tab%22%3A0%7D%5D", - "refId": "B", - "step": 5, - "target": "" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Memory", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "transparent": false, - "type": "graph", - "xaxis": { - "show": true - }, - "yaxes": [ - { - "format": "bytes", - "label": "", - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "bytes", - "logBase": 1, - "max": null, - "min": 0, - "show": true - } - ] - }, - { - "aliasColors": {}, - "bars": false, - "datasource": "${DS_PROMETHEUS}", - "decimals": 2, - "editable": true, - "error": false, - "fill": 6, - "grid": { - "threshold1": null, - "threshold1Color": "rgba(216, 200, 27, 0.27)", - "threshold2": null, - "threshold2Color": "rgba(234, 112, 112, 0.22)", - "thresholdLine": false - }, - "height": "", - "id": 29, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "hideEmpty": false, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "span": 6, - "stack": true, - "steppedLine": false, - "targets": [ - { - "calculatedInterval": "2s", - "datasourceErrors": {}, - "errors": {}, - "expr": "node_memory_MemTotal{alias=\"$host\"} - (node_memory_MemFree{alias=\"$host\"} + node_memory_Buffers{alias=\"$host\"} + node_memory_Cached{alias=\"$host\"})", - "intervalFactor": 1, - "legendFormat": "Used", - "metric": "", - "prometheusLink": "/api/datasources/proxy/1/graph#%5B%7B%22expr%22%3A%22node_memory_MemTotal%7Balias%3D%5C%22%24host%5C%22%7D%20-%20(node_memory_MemFree%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Buffers%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Cached%7Balias%3D%5C%22%24host%5C%22%7D)%22%2C%22range_input%22%3A%22900s%22%2C%22end_input%22%3A%222015-10-22%2015%3A25%22%2C%22step_input%22%3A%22%22%2C%22stacked%22%3Atrue%2C%22tab%22%3A0%7D%5D", - "refId": "A", - "step": 5, - "target": "" - }, - { - "calculatedInterval": "2s", - "datasourceErrors": {}, - "errors": {}, - "expr": "node_memory_MemFree{alias=\"$host\"}", - "intervalFactor": 1, - "legendFormat": "Free", - "metric": "", - "prometheusLink": "/api/datasources/proxy/1/graph#%5B%7B%22expr%22%3A%22node_memory_MemFree%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Buffers%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Cached%7Balias%3D%5C%22%24host%5C%22%7D%22%2C%22range_input%22%3A%22900s%22%2C%22end_input%22%3A%222015-10-22%2015%3A25%22%2C%22step_input%22%3A%22%22%2C%22stacked%22%3Atrue%2C%22tab%22%3A0%7D%5D", - "refId": "B", - "step": 5, - "target": "" - }, - { - "calculatedInterval": "2s", - "datasourceErrors": {}, - "errors": {}, - "expr": "node_memory_Buffers{alias=\"$host\"}", - "intervalFactor": 1, - "legendFormat": "Buffers", - "metric": "", - "prometheusLink": "/api/datasources/proxy/1/graph#%5B%7B%22expr%22%3A%22node_memory_MemFree%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Buffers%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Cached%7Balias%3D%5C%22%24host%5C%22%7D%22%2C%22range_input%22%3A%22900s%22%2C%22end_input%22%3A%222015-10-22%2015%3A25%22%2C%22step_input%22%3A%22%22%2C%22stacked%22%3Atrue%2C%22tab%22%3A0%7D%5D", - "refId": "D", - "step": 5, - "target": "" - }, - { - "calculatedInterval": "2s", - "datasourceErrors": {}, - "errors": {}, - "expr": "node_memory_Cached{alias=\"$host\"}", - "intervalFactor": 1, - "legendFormat": "Cached", - "metric": "", - "prometheusLink": "/api/datasources/proxy/1/graph#%5B%7B%22expr%22%3A%22node_memory_MemFree%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Buffers%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Cached%7Balias%3D%5C%22%24host%5C%22%7D%22%2C%22range_input%22%3A%22900s%22%2C%22end_input%22%3A%222015-10-22%2015%3A25%22%2C%22step_input%22%3A%22%22%2C%22stacked%22%3Atrue%2C%22tab%22%3A0%7D%5D", - "refId": "E", - "step": 5, - "target": "" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Memory Distribution", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "transparent": false, - "type": "graph", - "xaxis": { - "show": true - }, - "yaxes": [ - { - "format": "bytes", - "label": "", - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "bytes", - "logBase": 1, - "max": null, - "min": 0, - "show": true - } - ] - }, - { - "aliasColors": {}, - "bars": true, - "datasource": "${DS_PROMETHEUS}", - "decimals": 2, - "editable": true, - "error": false, - "fill": 2, - "grid": { - "threshold1": null, - "threshold1Color": "rgb(241, 156, 15)", - "threshold2": null, - "threshold2Color": "rgb(246, 17, 17)", - "thresholdLine": true - }, - "id": 24, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "hideEmpty": false, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "total": false, - "values": true - }, - "lines": false, - "linewidth": 2, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "Forks", - "color": "#EF843C" - } - ], - "span": 6, - "stack": false, - "steppedLine": false, - "targets": [ - { - "calculatedInterval": "2m", - "datasourceErrors": {}, - "errors": {}, - "expr": "rate(node_forks{alias=\"$host\"}[$interval]) or irate(node_forks{alias=\"$host\"}[5m])", - "intervalFactor": 1, - "legendFormat": "Forks", - "metric": "", - "prometheusLink": "/api/datasources/proxy/1/graph#%5B%7B%22expr%22%3A%22node_procs_running%7Balias%3D%5C%22%24host%5C%22%7D%22%2C%22range_input%22%3A%2243200s%22%2C%22end_input%22%3A%222015-9-18%2013%3A46%22%2C%22step_input%22%3A%22%22%2C%22stacked%22%3Atrue%2C%22tab%22%3A0%7D%5D", - "refId": "A", - "step": 5, - "target": "" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Forks", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "transparent": false, - "type": "graph", - "xaxis": { - "show": true - }, - "yaxes": [ - { - "format": "none", - "label": "", - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "none", - "logBase": 1, - "max": null, - "min": 0, - "show": true - } - ] - }, - { - "aliasColors": {}, - "bars": true, - "datasource": "${DS_PROMETHEUS}", - "decimals": 2, - "editable": true, - "error": false, - "fill": 2, - "grid": { - "threshold1": null, - "threshold1Color": "rgb(241, 156, 15)", - "threshold2": null, - "threshold2Color": "rgb(246, 17, 17)", - "thresholdLine": true - }, - "id": 20, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "hideEmpty": false, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "total": false, - "values": true - }, - "lines": false, - "linewidth": 2, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "Processes blocked waiting for I/O to complete", - "color": "#E24D42" - }, - { - "alias": "Processes in runnable state", - "color": "#6ED0E0" - } - ], - "span": 6, - "stack": true, - "steppedLine": false, - "targets": [ - { - "calculatedInterval": "2m", - "datasourceErrors": {}, - "errors": {}, - "expr": "node_procs_running{alias=\"$host\"}", - "intervalFactor": 1, - "legendFormat": "Processes in runnable state", - "metric": "", - "prometheusLink": "/api/datasources/proxy/1/graph#%5B%7B%22expr%22%3A%22node_procs_running%7Balias%3D%5C%22%24host%5C%22%7D%22%2C%22range_input%22%3A%2243200s%22%2C%22end_input%22%3A%222015-9-18%2013%3A46%22%2C%22step_input%22%3A%22%22%2C%22stacked%22%3Atrue%2C%22tab%22%3A0%7D%5D", - "refId": "A", - "step": 5, - "target": "" - }, - { - "calculatedInterval": "2m", - "datasourceErrors": {}, - "errors": {}, - "expr": "node_procs_blocked{alias=\"$host\"}", - "intervalFactor": 1, - "legendFormat": "Processes blocked waiting for I/O to complete", - "metric": "", - "prometheusLink": "/api/datasources/proxy/1/graph#%5B%7B%22expr%22%3A%22node_procs_blocked%7Balias%3D%5C%22%24host%5C%22%7D%22%2C%22range_input%22%3A%2243200s%22%2C%22end_input%22%3A%222015-9-18%2013%3A46%22%2C%22step_input%22%3A%22%22%2C%22stacked%22%3Atrue%2C%22tab%22%3A0%7D%5D", - "refId": "B", - "step": 5, - "target": "" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Processes", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "transparent": false, - "type": "graph", - "xaxis": { - "show": true - }, - "yaxes": [ - { - "format": "none", - "label": "", - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "none", - "logBase": 1, - "max": null, - "min": 0, - "show": true - } - ] - }, - { - "aliasColors": {}, - "bars": false, - "datasource": "${DS_PROMETHEUS}", - "decimals": 2, - "editable": true, - "error": false, - "fill": 2, - "grid": { - "threshold1": null, - "threshold1Color": "rgb(241, 156, 15)", - "threshold2": null, - "threshold2Color": "rgb(246, 17, 17)", - "thresholdLine": true - }, - "id": 27, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "hideEmpty": false, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "span": 6, - "stack": false, - "steppedLine": false, - "targets": [ - { - "calculatedInterval": "2m", - "datasourceErrors": {}, - "errors": {}, - "expr": "rate(node_context_switches{alias=\"$host\"}[$interval]) or irate(node_context_switches{alias=\"$host\"}[5m])", - "intervalFactor": 1, - "legendFormat": "Context Switches", - "metric": "", - "prometheusLink": "/api/datasources/proxy/1/graph#%5B%7B%22expr%22%3A%22node_procs_running%7Balias%3D%5C%22%24host%5C%22%7D%22%2C%22range_input%22%3A%2243200s%22%2C%22end_input%22%3A%222015-9-18%2013%3A46%22%2C%22step_input%22%3A%22%22%2C%22stacked%22%3Atrue%2C%22tab%22%3A0%7D%5D", - "refId": "A", - "step": 5, - "target": "" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Context Switches", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "transparent": false, - "type": "graph", - "xaxis": { - "show": true - }, - "yaxes": [ - { - "format": "none", - "label": "", - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "none", - "logBase": 1, - "max": null, - "min": 0, - "show": true - } - ] - }, - { - "aliasColors": {}, - "bars": false, - "datasource": "${DS_PROMETHEUS}", - "decimals": 2, - "editable": true, - "error": false, - "fill": 2, - "grid": { - "threshold1": null, - "threshold1Color": "rgb(241, 156, 15)", - "threshold2": null, - "threshold2Color": "rgb(246, 17, 17)", - "thresholdLine": true - }, - "id": 28, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "hideEmpty": false, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "Interrupts", - "color": "#D683CE" - } - ], - "span": 6, - "stack": false, - "steppedLine": false, - "targets": [ - { - "calculatedInterval": "2m", - "datasourceErrors": {}, - "errors": {}, - "expr": "rate(node_intr{alias=\"$host\"}[$interval]) or irate(node_intr{alias=\"$host\"}[5m])", - "intervalFactor": 1, - "legendFormat": "Interrupts", - "metric": "", - "prometheusLink": "/api/datasources/proxy/1/graph#%5B%7B%22expr%22%3A%22node_procs_running%7Balias%3D%5C%22%24host%5C%22%7D%22%2C%22range_input%22%3A%2243200s%22%2C%22end_input%22%3A%222015-9-18%2013%3A46%22%2C%22step_input%22%3A%22%22%2C%22stacked%22%3Atrue%2C%22tab%22%3A0%7D%5D", - "refId": "A", - "step": 5, - "target": "" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Interrupts", - "tooltip": { - "msResolution": true, - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "transparent": false, - "type": "graph", - "xaxis": { - "show": true - }, - "yaxes": [ - { - "format": "none", - "label": "", - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "none", - "logBase": 1, - "max": null, - "min": 0, - "show": true - } - ] - }, - { - "aliasColors": {}, - "bars": false, - "datasource": "${DS_PROMETHEUS}", - "decimals": 2, - "editable": true, - "error": false, - "fill": 6, - "grid": { - "threshold1": null, - "threshold1Color": "rgba(216, 200, 27, 0.27)", - "threshold2": null, - "threshold2Color": "rgba(234, 112, 112, 0.22)", - "thresholdLine": false - }, - "id": 21, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "hideEmpty": false, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "span": 6, - "stack": true, - "steppedLine": false, - "targets": [ - { - "calculatedInterval": "2s", - "datasourceErrors": {}, - "errors": {}, - "expr": "rate(node_network_receive_bytes{alias=\"$host\", device!=\"lo\"}[$interval]) or irate(node_network_receive_bytes{alias=\"$host\", device!=\"lo\"}[5m])", - "intervalFactor": 1, - "legendFormat": "Inbound: {{ device }}", - "metric": "", - "prometheusLink": "/api/datasources/proxy/1/graph#%5B%7B%22expr%22%3A%22node_memory_MemFree%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Buffers%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Cached%7Balias%3D%5C%22%24host%5C%22%7D%22%2C%22range_input%22%3A%22900s%22%2C%22end_input%22%3A%222015-10-22%2015%3A25%22%2C%22step_input%22%3A%22%22%2C%22stacked%22%3Atrue%2C%22tab%22%3A0%7D%5D", - "refId": "B", - "step": 5, - "target": "" - }, - { - "calculatedInterval": "2s", - "datasourceErrors": {}, - "errors": {}, - "expr": "rate(node_network_transmit_bytes{alias=\"$host\", device!=\"lo\"}[$interval]) or irate(node_network_transmit_bytes{alias=\"$host\", device!=\"lo\"}[5m])", - "intervalFactor": 1, - "legendFormat": "Outbound: {{ device }}", - "metric": "", - "prometheusLink": "/api/datasources/proxy/1/graph#%5B%7B%22expr%22%3A%22node_memory_MemTotal%7Balias%3D%5C%22%24host%5C%22%7D%20-%20(node_memory_MemFree%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Buffers%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Cached%7Balias%3D%5C%22%24host%5C%22%7D)%22%2C%22range_input%22%3A%22900s%22%2C%22end_input%22%3A%222015-10-22%2015%3A25%22%2C%22step_input%22%3A%22%22%2C%22stacked%22%3Atrue%2C%22tab%22%3A0%7D%5D", - "refId": "A", - "step": 5, - "target": "" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Network Traffic", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "transparent": false, - "type": "graph", - "xaxis": { - "show": true - }, - "yaxes": [ - { - "format": "Bps", - "label": "", - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "bytes", - "logBase": 1, - "max": null, - "min": 0, - "show": true - } - ] - }, - { - "aliasColors": {}, - "bars": true, - "datasource": "${DS_PROMETHEUS}", - "decimals": 2, - "editable": true, - "error": false, - "fill": 6, - "grid": { - "threshold1": null, - "threshold1Color": "rgba(216, 200, 27, 0.27)", - "threshold2": null, - "threshold2Color": "rgba(234, 112, 112, 0.22)", - "thresholdLine": false - }, - "id": 22, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "hideEmpty": false, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "sort": "min", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": false, - "linewidth": 2, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "span": 6, - "stack": true, - "steppedLine": false, - "targets": [ - { - "calculatedInterval": "2s", - "datasourceErrors": {}, - "errors": {}, - "expr": "sum(increase(node_network_receive_bytes{alias=\"$host\", device!=\"lo\"}[1h]))", - "interval": "1h", - "intervalFactor": 1, - "legendFormat": "Received", - "metric": "", - "prometheusLink": "/api/datasources/proxy/1/graph#%5B%7B%22expr%22%3A%22node_memory_MemTotal%7Balias%3D%5C%22%24host%5C%22%7D%20-%20(node_memory_MemFree%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Buffers%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Cached%7Balias%3D%5C%22%24host%5C%22%7D)%22%2C%22range_input%22%3A%22900s%22%2C%22end_input%22%3A%222015-10-22%2015%3A25%22%2C%22step_input%22%3A%22%22%2C%22stacked%22%3Atrue%2C%22tab%22%3A0%7D%5D", - "refId": "A", - "step": 3600, - "target": "" - }, - { - "calculatedInterval": "2s", - "datasourceErrors": {}, - "errors": {}, - "expr": "sum(increase(node_network_transmit_bytes{alias=\"$host\", device!=\"lo\"}[1h]))", - "interval": "1h", - "intervalFactor": 1, - "legendFormat": "Sent", - "metric": "", - "prometheusLink": "/api/datasources/proxy/1/graph#%5B%7B%22expr%22%3A%22node_memory_MemTotal%7Balias%3D%5C%22%24host%5C%22%7D%20-%20(node_memory_MemFree%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Buffers%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Cached%7Balias%3D%5C%22%24host%5C%22%7D)%22%2C%22range_input%22%3A%22900s%22%2C%22end_input%22%3A%222015-10-22%2015%3A25%22%2C%22step_input%22%3A%22%22%2C%22stacked%22%3Atrue%2C%22tab%22%3A0%7D%5D", - "refId": "B", - "step": 3600, - "target": "" - } - ], - "timeFrom": "24h", - "timeShift": null, - "title": "Network Utilization Hourly", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "transparent": false, - "type": "graph", - "xaxis": { - "show": true - }, - "yaxes": [ - { - "format": "bytes", - "label": "", - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "bytes", - "logBase": 1, - "max": null, - "min": 0, - "show": true - } - ] - }, - { - "aliasColors": {}, - "bars": false, - "datasource": "${DS_PROMETHEUS}", - "decimals": 2, - "editable": true, - "error": false, - "fill": 6, - "grid": { - "threshold1": null, - "threshold1Color": "rgba(216, 200, 27, 0.27)", - "threshold2": null, - "threshold2Color": "rgba(234, 112, 112, 0.22)", - "thresholdLine": false - }, - "id": 23, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "hideEmpty": false, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "Used", - "color": "#584477" - }, - { - "alias": "Free", - "color": "#AEA2E0" - } - ], - "span": 6, - "stack": true, - "steppedLine": false, - "targets": [ - { - "calculatedInterval": "2s", - "datasourceErrors": {}, - "errors": {}, - "expr": "node_memory_SwapTotal{alias=\"$host\"} - node_memory_SwapFree{alias=\"$host\"}", - "intervalFactor": 1, - "legendFormat": "Used", - "metric": "", - "prometheusLink": "/api/datasources/proxy/1/graph#%5B%7B%22expr%22%3A%22node_memory_MemTotal%7Balias%3D%5C%22%24host%5C%22%7D%20-%20(node_memory_MemFree%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Buffers%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Cached%7Balias%3D%5C%22%24host%5C%22%7D)%22%2C%22range_input%22%3A%22900s%22%2C%22end_input%22%3A%222015-10-22%2015%3A25%22%2C%22step_input%22%3A%22%22%2C%22stacked%22%3Atrue%2C%22tab%22%3A0%7D%5D", - "refId": "A", - "step": 5, - "target": "" - }, - { - "calculatedInterval": "2s", - "datasourceErrors": {}, - "errors": {}, - "expr": "node_memory_SwapFree{alias=\"$host\"}", - "intervalFactor": 1, - "legendFormat": "Free", - "metric": "", - "prometheusLink": "/api/datasources/proxy/1/graph#%5B%7B%22expr%22%3A%22node_memory_MemFree%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Buffers%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Cached%7Balias%3D%5C%22%24host%5C%22%7D%22%2C%22range_input%22%3A%22900s%22%2C%22end_input%22%3A%222015-10-22%2015%3A25%22%2C%22step_input%22%3A%22%22%2C%22stacked%22%3Atrue%2C%22tab%22%3A0%7D%5D", - "refId": "B", - "step": 5, - "target": "" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Swap", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "transparent": false, - "type": "graph", - "xaxis": { - "show": true - }, - "yaxes": [ - { - "format": "bytes", - "label": "", - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "bytes", - "logBase": 1, - "max": null, - "min": 0, - "show": true - } - ] - }, - { - "aliasColors": {}, - "bars": false, - "datasource": "${DS_PROMETHEUS}", - "decimals": 2, - "editable": true, - "error": false, - "fill": 2, - "grid": { - "threshold1": null, - "threshold1Color": "rgba(216, 200, 27, 0.27)", - "threshold2": null, - "threshold2Color": "rgba(234, 112, 112, 0.22)", - "thresholdLine": false - }, - "id": 30, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "hideEmpty": false, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "span": 6, - "stack": false, - "steppedLine": false, - "targets": [ - { - "calculatedInterval": "2s", - "datasourceErrors": {}, - "errors": {}, - "expr": "rate(node_vmstat_pswpin{alias=\"$host\"}[$interval]) * 4096 or irate(node_vmstat_pswpin{alias=\"$host\"}[5m]) * 4096", - "intervalFactor": 1, - "legendFormat": "Swap In", - "metric": "", - "prometheusLink": "/api/datasources/proxy/1/graph#%5B%7B%22expr%22%3A%22node_memory_MemTotal%7Balias%3D%5C%22%24host%5C%22%7D%20-%20(node_memory_MemFree%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Buffers%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Cached%7Balias%3D%5C%22%24host%5C%22%7D)%22%2C%22range_input%22%3A%22900s%22%2C%22end_input%22%3A%222015-10-22%2015%3A25%22%2C%22step_input%22%3A%22%22%2C%22stacked%22%3Atrue%2C%22tab%22%3A0%7D%5D", - "refId": "A", - "step": 5, - "target": "" - }, - { - "calculatedInterval": "2s", - "datasourceErrors": {}, - "errors": {}, - "expr": "rate(node_vmstat_pswpout{alias=\"$host\"}[$interval]) * 4096 or irate(node_vmstat_pswpout{alias=\"$host\"}[5m]) * 4096", - "intervalFactor": 1, - "legendFormat": "Swap Out", - "metric": "", - "prometheusLink": "/api/datasources/proxy/1/graph#%5B%7B%22expr%22%3A%22node_memory_MemFree%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Buffers%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Cached%7Balias%3D%5C%22%24host%5C%22%7D%22%2C%22range_input%22%3A%22900s%22%2C%22end_input%22%3A%222015-10-22%2015%3A25%22%2C%22step_input%22%3A%22%22%2C%22stacked%22%3Atrue%2C%22tab%22%3A0%7D%5D", - "refId": "B", - "step": 5, - "target": "" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Swap Activity", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "transparent": false, - "type": "graph", - "xaxis": { - "show": true - }, - "yaxes": [ - { - "format": "Bps", - "label": "", - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "bytes", - "logBase": 1, - "max": null, - "min": 0, - "show": true - } - ] - }, - { - "aliasColors": {}, - "bars": false, - "datasource": "${DS_PROMETHEUS}", - "decimals": 2, - "editable": true, - "error": false, - "fill": 2, - "grid": { - "threshold1": null, - "threshold1Color": "rgba(216, 200, 27, 0.27)", - "threshold2": null, - "threshold2Color": "rgba(234, 112, 112, 0.22)", - "thresholdLine": false - }, - "id": 31, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "hideEmpty": false, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "span": 6, - "stack": false, - "steppedLine": false, - "targets": [ - { - "calculatedInterval": "2s", - "datasourceErrors": {}, - "errors": {}, - "expr": "rate(node_vmstat_pgpgin{alias=\"$host\"}[$interval]) * 1024 or irate(node_vmstat_pgpgin{alias=\"$host\"}[5m]) * 1024", - "intervalFactor": 1, - "legendFormat": "Page In", - "metric": "", - "prometheusLink": "/api/datasources/proxy/1/graph#%5B%7B%22expr%22%3A%22node_memory_MemTotal%7Balias%3D%5C%22%24host%5C%22%7D%20-%20(node_memory_MemFree%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Buffers%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Cached%7Balias%3D%5C%22%24host%5C%22%7D)%22%2C%22range_input%22%3A%22900s%22%2C%22end_input%22%3A%222015-10-22%2015%3A25%22%2C%22step_input%22%3A%22%22%2C%22stacked%22%3Atrue%2C%22tab%22%3A0%7D%5D", - "refId": "A", - "step": 5, - "target": "" - }, - { - "calculatedInterval": "2s", - "datasourceErrors": {}, - "errors": {}, - "expr": "rate(node_vmstat_pgpgout{alias=\"$host\"}[$interval]) * 1024 or irate(node_vmstat_pgpgout{alias=\"$host\"}[5m]) * 1024", - "intervalFactor": 1, - "legendFormat": "Page Out", - "metric": "", - "prometheusLink": "/api/datasources/proxy/1/graph#%5B%7B%22expr%22%3A%22node_memory_MemFree%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Buffers%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Cached%7Balias%3D%5C%22%24host%5C%22%7D%22%2C%22range_input%22%3A%22900s%22%2C%22end_input%22%3A%222015-10-22%2015%3A25%22%2C%22step_input%22%3A%22%22%2C%22stacked%22%3Atrue%2C%22tab%22%3A0%7D%5D", - "refId": "B", - "step": 5, - "target": "" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "I/O Activity", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "transparent": false, - "type": "graph", - "xaxis": { - "show": true - }, - "yaxes": [ - { - "format": "Bps", - "label": "", - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "bytes", - "logBase": 1, - "max": null, - "min": 0, - "show": true - } - ] - } - ], - "title": "New row" - } - ], - "time": { - "from": "now-1h", - "to": "now" - }, - "timepicker": { - "collapse": false, - "enable": true, - "notice": false, - "now": true, - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "status": "Stable", - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ], - "type": "timepicker" - }, - "templating": { - "list": [ - { - "allFormat": "glob", - "auto": true, - "auto_count": 200, - "auto_min": "1s", - "current": { - "selected": true, - "text": "5s", - "value": "5s" - }, - "datasource": "Prometheus", - "hide": 0, - "includeAll": false, - "label": "Interval", - "multi": false, - "multiFormat": "glob", - "name": "interval", - "options": [ - { - "selected": false, - "text": "auto", - "value": "$__auto_interval" - }, - { - "selected": false, - "text": "1s", - "value": "1s" - }, - { - "selected": true, - "text": "5s", - "value": "5s" - }, - { - "selected": false, - "text": "1m", - "value": "1m" - }, - { - "selected": false, - "text": "5m", - "value": "5m" - }, - { - "selected": false, - "text": "1h", - "value": "1h" - }, - { - "selected": false, - "text": "6h", - "value": "6h" - }, - { - "selected": false, - "text": "1d", - "value": "1d" - } - ], - "query": "1s,5s,1m,5m,1h,6h,1d", - "refresh": 0, - "type": "interval" - }, - { - "allFormat": "glob", - "current": {}, - "datasource": "${DS_PROMETHEUS}", - "hide": 0, - "includeAll": false, - "label": "Host", - "multi": false, - "multiFormat": "regex values", - "name": "host", - "options": [], - "query": "label_values(alias)", - "refresh": 1, - "refresh_on_load": false, - "regex": "", - "tagValuesQuery": "alias", - "tagsQuery": "up", - "type": "query", - "useTags": false - } - ] - }, - "annotations": { - "list": [ - { - "datasource": "${DS_PROMETHEUS}", - "enable": false, - "expr": "ALERTS{alias=\"$host\", alertstate=\"firing\"}", - "iconColor": "rgb(252, 5, 0)", - "name": "Alert", - "tagKeys": "severity", - "textFormat": "{{ alias }} : {{alertstate}}", - "titleFormat": "{{ alertname }}" - }, - { - "datasource": "${DS_PROMETHEUS}", - "enable": true, - "expr": "ALERTS{alias=\"$host\",alertstate=\"pending\"}", - "iconColor": "rgb(228, 242, 9)", - "name": "Warning", - "tagKeys": "severity", - "textFormat": "{{ alias }} : {{ alertstate }}", - "titleFormat": "{{ alertname }}" - } - ] - }, - "refresh": "30s", - "schemaVersion": 12, - "version": 18, - "links": [], - "gnetId": 159, - "description": "Prometheus for system metrics. \r\nLoad, CPU, RAM, network, process ... " -} \ No newline at end of file diff --git a/monitor/grafana/dashboards/prometheus_system_rev1.json b/monitor/grafana/dashboards/prometheus_system_rev1.json new file mode 100644 index 00000000..99e98b4f --- /dev/null +++ b/monitor/grafana/dashboards/prometheus_system_rev1.json @@ -0,0 +1,1905 @@ +{ + "__inputs": [ + { + "name": "DS_PROMETHEUS", + "label": "Prometheus", + "description": "", + "type": "datasource", + "pluginId": "prometheus", + "pluginName": "Prometheus" + } + ], + "__requires": [ + { + "type": "panel", + "id": "singlestat", + "name": "Singlestat", + "version": "" + }, + { + "type": "panel", + "id": "graph", + "name": "Graph", + "version": "" + }, + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "3.1.0" + }, + { + "type": "datasource", + "id": "prometheus", + "name": "Prometheus", + "version": "1.0.0" + } + ], + "id": null, + "title": "Prometheus system", + "tags": [ + "system", + "prometheus", + "online", + "home" + ], + "style": "dark", + "timezone": "browser", + "editable": true, + "hideControls": false, + "sharedCrosshair": true, + "rows": [ + { + "collapse": false, + "editable": true, + "height": "250px", + "panels": [ + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "datasource": "${DS_PROMETHEUS}", + "decimals": 1, + "editable": true, + "error": false, + "format": "s", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "height": "50px", + "id": 19, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "s", + "postfixFontSize": "80%", + "prefix": "", + "prefixFontSize": "80%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "span": 3, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "targets": [ + { + "calculatedInterval": "10m", + "datasourceErrors": {}, + "errors": {}, + "expr": "node_time{alias=\"$host\"} - node_boot_time{alias=\"$host\"}", + "interval": "5m", + "intervalFactor": 1, + "legendFormat": "", + "metric": "", + "prometheusLink": "/api/datasources/proxy/1/graph#%5B%7B%22expr%22%3A%22node_time%7Balias%3D%5C%22%24host%5C%22%7D%20-%20node_boot_time%7Balias%3D%5C%22%24host%5C%22%7D%22%2C%22range_input%22%3A%2243200s%22%2C%22end_input%22%3A%222015-9-18%2013%3A25%22%2C%22step_input%22%3A%22%22%2C%22tab%22%3A0%7D%5D", + "refId": "A", + "step": 300 + } + ], + "thresholds": "300,3600", + "title": "System Uptime", + "transparent": false, + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "datasource": "${DS_PROMETHEUS}", + "editable": true, + "error": false, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "height": "55px", + "id": 25, + "interval": null, + "isNew": true, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "80%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "span": 3, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "targets": [ + { + "expr": "count(node_cpu{mode=\"user\", alias=\"$host\"})", + "interval": "5m", + "intervalFactor": 1, + "refId": "A", + "step": 300 + } + ], + "thresholds": "", + "title": "Virtual CPUs", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "datasource": "${DS_PROMETHEUS}", + "decimals": 2, + "editable": true, + "error": false, + "format": "bytes", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "height": "55px", + "id": 26, + "interval": null, + "isNew": true, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "80%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "span": 3, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "targets": [ + { + "expr": "node_memory_MemAvailable{alias=\"$host\"}", + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "metric": "node_memory_MemAvailable", + "refId": "A", + "step": 30 + } + ], + "thresholds": "", + "title": "RAM available", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(245, 54, 54, 0.9)" + ], + "datasource": "${DS_PROMETHEUS}", + "decimals": 0, + "editable": true, + "error": false, + "format": "percent", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "height": "50px", + "id": 9, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "80%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "span": 3, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": true, + "lineColor": "rgb(31, 120, 193)", + "show": true + }, + "targets": [ + { + "calculatedInterval": "10m", + "datasourceErrors": {}, + "errors": {}, + "expr": "(node_memory_MemAvailable{alias=\"$host\"} or (node_memory_MemFree{alias=\"$host\"} + node_memory_Buffers{alias=\"$host\"} + node_memory_Cached{alias=\"$host\"})) / node_memory_MemTotal{alias=\"$host\"} * 100", + "interval": "5m", + "intervalFactor": 1, + "legendFormat": "", + "metric": "node_mem", + "prometheusLink": "/api/datasources/proxy/1/graph#%5B%7B%22expr%22%3A%22(node_memory_MemFree%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Buffers%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Cached%7Balias%3D%5C%22%24host%5C%22%7D)%20%2F%20node_memory_MemTotal%7Balias%3D%5C%22%24host%5C%22%7D%20*%20100%22%2C%22range_input%22%3A%2243201s%22%2C%22end_input%22%3A%222015-9-15%2013%3A54%22%2C%22step_input%22%3A%22%22%2C%22tab%22%3A0%7D%5D", + "refId": "A", + "step": 300 + } + ], + "thresholds": "90,95", + "title": "Memory Available", + "transparent": false, + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [], + "valueName": "current" + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_PROMETHEUS}", + "decimals": 2, + "editable": true, + "error": false, + "fill": 6, + "grid": { + "threshold1": null, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": null, + "threshold2Color": "rgba(234, 112, 112, 0.22)", + "thresholdLine": false + }, + "height": "260px", + "id": 2, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "hideEmpty": false, + "max": true, + "min": true, + "rightSide": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "calculatedInterval": "2s", + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(rate(node_cpu{alias=\"$host\"}[$interval])) by (mode) * 100 / count_scalar(node_cpu{mode=\"user\", alias=\"$host\"}) or sum(irate(node_cpu{alias=\"$host\"}[5m])) by (mode) * 100 / count_scalar(node_cpu{mode=\"user\", alias=\"$host\"})", + "intervalFactor": 1, + "legendFormat": "{{ mode }}", + "metric": "", + "prometheusLink": "/api/datasources/proxy/1/graph#%5B%7B%22expr%22%3A%22sum(rate(node_cpu%7Balias%3D%5C%22%24host%5C%22%7D%5B%24interval%5D))%20by%20(mode)%20*%20100%22%2C%22range_input%22%3A%223600s%22%2C%22end_input%22%3A%222015-10-22%2015%3A27%22%2C%22step_input%22%3A%22%22%2C%22stacked%22%3Atrue%2C%22tab%22%3A0%7D%5D", + "refId": "A", + "step": 2 + } + ], + "timeFrom": null, + "timeShift": null, + "title": "CPU Usage", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "percent", + "label": "", + "logBase": 1, + "max": 100, + "min": 0, + "show": true + }, + { + "format": "short", + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_PROMETHEUS}", + "decimals": 2, + "editable": true, + "error": false, + "fill": 2, + "grid": { + "threshold1": null, + "threshold1Color": "rgb(241, 156, 15)", + "threshold2": null, + "threshold2Color": "rgb(246, 17, 17)", + "thresholdLine": true + }, + "id": 18, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "hideEmpty": false, + "max": true, + "min": true, + "rightSide": true, + "show": true, + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "Load 1m", + "color": "#E24D42" + }, + { + "alias": "Load 5m", + "color": "#E0752D" + }, + { + "alias": "Load 15m", + "color": "#E5AC0E" + } + ], + "span": 12, + "stack": false, + "steppedLine": false, + "targets": [ + { + "calculatedInterval": "10s", + "datasourceErrors": {}, + "errors": {}, + "expr": "node_load1{alias=\"$host\"}", + "intervalFactor": 1, + "legendFormat": "Load 1m", + "metric": "", + "prometheusLink": "/api/datasources/proxy/1/graph#%5B%7B%22expr%22%3A%22node_load1%7Balias%3D%5C%22%24host%5C%22%7D%22%2C%22range_input%22%3A%223601s%22%2C%22end_input%22%3A%222015-10-22%2015%3A27%22%2C%22step_input%22%3A%22%22%2C%22stacked%22%3Afalse%2C%22tab%22%3A0%7D%5D", + "refId": "A", + "step": 2, + "target": "" + }, + { + "calculatedInterval": "10s", + "datasourceErrors": {}, + "errors": {}, + "expr": "node_load5{alias=\"$host\"}", + "intervalFactor": 1, + "legendFormat": "Load 5m", + "metric": "", + "prometheusLink": "/api/datasources/proxy/1/graph#%5B%7B%22expr%22%3A%22node_load5%7Balias%3D%5C%22%24host%5C%22%7D%22%2C%22range_input%22%3A%223600s%22%2C%22end_input%22%3A%222015-10-22%2015%3A27%22%2C%22step_input%22%3A%22%22%2C%22stacked%22%3Afalse%2C%22tab%22%3A0%7D%5D", + "refId": "B", + "step": 2, + "target": "" + }, + { + "calculatedInterval": "10s", + "datasourceErrors": {}, + "errors": {}, + "expr": "node_load15{alias=\"$host\"}", + "intervalFactor": 1, + "legendFormat": "Load 15m", + "metric": "", + "prometheusLink": "/api/datasources/proxy/1/graph#%5B%7B%22expr%22%3A%22node_load15%7Balias%3D%5C%22%24host%5C%22%7D%22%2C%22range_input%22%3A%223600s%22%2C%22end_input%22%3A%222015-10-22%2015%3A27%22%2C%22step_input%22%3A%22%22%2C%22stacked%22%3Afalse%2C%22tab%22%3A0%7D%5D", + "refId": "C", + "step": 2, + "target": "" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Load Average", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "transparent": false, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "none", + "label": "", + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "none", + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + } + ], + "showTitle": false, + "title": "System Stats" + }, + { + "collapse": false, + "editable": true, + "height": "300px", + "panels": [ + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_PROMETHEUS}", + "decimals": 2, + "editable": true, + "error": false, + "fill": 6, + "grid": { + "threshold1": null, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": null, + "threshold2Color": "rgba(234, 112, 112, 0.22)", + "thresholdLine": false + }, + "height": "", + "id": 6, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "hideEmpty": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "Used", + "color": "#0A437C" + }, + { + "alias": "Available", + "color": "#5195CE" + }, + { + "alias": "Total", + "color": "#052B51", + "legend": false, + "stack": false + } + ], + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "calculatedInterval": "2s", + "datasourceErrors": {}, + "errors": {}, + "expr": "node_memory_MemTotal{alias=\"$host\"}", + "intervalFactor": 1, + "legendFormat": "Total", + "metric": "", + "prometheusLink": "/api/datasources/proxy/1/graph#%5B%7B%22expr%22%3A%22node_memory_MemFree%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Buffers%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Cached%7Balias%3D%5C%22%24host%5C%22%7D%22%2C%22range_input%22%3A%22900s%22%2C%22end_input%22%3A%222015-10-22%2015%3A25%22%2C%22step_input%22%3A%22%22%2C%22stacked%22%3Atrue%2C%22tab%22%3A0%7D%5D", + "refId": "C", + "step": 5, + "target": "" + }, + { + "calculatedInterval": "2s", + "datasourceErrors": {}, + "errors": {}, + "expr": "node_memory_MemTotal{alias=\"$host\"} - (node_memory_MemAvailable{alias=\"$host\"} or (node_memory_MemFree{alias=\"$host\"} + node_memory_Buffers{alias=\"$host\"} + node_memory_Cached{alias=\"$host\"}))", + "intervalFactor": 1, + "legendFormat": "Used", + "metric": "", + "prometheusLink": "/api/datasources/proxy/1/graph#%5B%7B%22expr%22%3A%22node_memory_MemTotal%7Balias%3D%5C%22%24host%5C%22%7D%20-%20(node_memory_MemFree%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Buffers%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Cached%7Balias%3D%5C%22%24host%5C%22%7D)%22%2C%22range_input%22%3A%22900s%22%2C%22end_input%22%3A%222015-10-22%2015%3A25%22%2C%22step_input%22%3A%22%22%2C%22stacked%22%3Atrue%2C%22tab%22%3A0%7D%5D", + "refId": "A", + "step": 5, + "target": "" + }, + { + "calculatedInterval": "2s", + "datasourceErrors": {}, + "errors": {}, + "expr": "node_memory_MemAvailable{alias=\"$host\"} or (node_memory_MemFree{alias=\"$host\"} + node_memory_Buffers{alias=\"$host\"} + node_memory_Cached{alias=\"$host\"})", + "intervalFactor": 1, + "legendFormat": "Available", + "metric": "", + "prometheusLink": "/api/datasources/proxy/1/graph#%5B%7B%22expr%22%3A%22node_memory_MemFree%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Buffers%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Cached%7Balias%3D%5C%22%24host%5C%22%7D%22%2C%22range_input%22%3A%22900s%22%2C%22end_input%22%3A%222015-10-22%2015%3A25%22%2C%22step_input%22%3A%22%22%2C%22stacked%22%3Atrue%2C%22tab%22%3A0%7D%5D", + "refId": "B", + "step": 5, + "target": "" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Memory", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "transparent": false, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "bytes", + "label": "", + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "bytes", + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_PROMETHEUS}", + "decimals": 2, + "editable": true, + "error": false, + "fill": 6, + "grid": { + "threshold1": null, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": null, + "threshold2Color": "rgba(234, 112, 112, 0.22)", + "thresholdLine": false + }, + "height": "", + "id": 29, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "hideEmpty": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "calculatedInterval": "2s", + "datasourceErrors": {}, + "errors": {}, + "expr": "node_memory_MemTotal{alias=\"$host\"} - (node_memory_MemFree{alias=\"$host\"} + node_memory_Buffers{alias=\"$host\"} + node_memory_Cached{alias=\"$host\"})", + "intervalFactor": 1, + "legendFormat": "Used", + "metric": "", + "prometheusLink": "/api/datasources/proxy/1/graph#%5B%7B%22expr%22%3A%22node_memory_MemTotal%7Balias%3D%5C%22%24host%5C%22%7D%20-%20(node_memory_MemFree%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Buffers%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Cached%7Balias%3D%5C%22%24host%5C%22%7D)%22%2C%22range_input%22%3A%22900s%22%2C%22end_input%22%3A%222015-10-22%2015%3A25%22%2C%22step_input%22%3A%22%22%2C%22stacked%22%3Atrue%2C%22tab%22%3A0%7D%5D", + "refId": "A", + "step": 5, + "target": "" + }, + { + "calculatedInterval": "2s", + "datasourceErrors": {}, + "errors": {}, + "expr": "node_memory_MemFree{alias=\"$host\"}", + "intervalFactor": 1, + "legendFormat": "Free", + "metric": "", + "prometheusLink": "/api/datasources/proxy/1/graph#%5B%7B%22expr%22%3A%22node_memory_MemFree%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Buffers%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Cached%7Balias%3D%5C%22%24host%5C%22%7D%22%2C%22range_input%22%3A%22900s%22%2C%22end_input%22%3A%222015-10-22%2015%3A25%22%2C%22step_input%22%3A%22%22%2C%22stacked%22%3Atrue%2C%22tab%22%3A0%7D%5D", + "refId": "B", + "step": 5, + "target": "" + }, + { + "calculatedInterval": "2s", + "datasourceErrors": {}, + "errors": {}, + "expr": "node_memory_Buffers{alias=\"$host\"}", + "intervalFactor": 1, + "legendFormat": "Buffers", + "metric": "", + "prometheusLink": "/api/datasources/proxy/1/graph#%5B%7B%22expr%22%3A%22node_memory_MemFree%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Buffers%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Cached%7Balias%3D%5C%22%24host%5C%22%7D%22%2C%22range_input%22%3A%22900s%22%2C%22end_input%22%3A%222015-10-22%2015%3A25%22%2C%22step_input%22%3A%22%22%2C%22stacked%22%3Atrue%2C%22tab%22%3A0%7D%5D", + "refId": "D", + "step": 5, + "target": "" + }, + { + "calculatedInterval": "2s", + "datasourceErrors": {}, + "errors": {}, + "expr": "node_memory_Cached{alias=\"$host\"}", + "intervalFactor": 1, + "legendFormat": "Cached", + "metric": "", + "prometheusLink": "/api/datasources/proxy/1/graph#%5B%7B%22expr%22%3A%22node_memory_MemFree%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Buffers%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Cached%7Balias%3D%5C%22%24host%5C%22%7D%22%2C%22range_input%22%3A%22900s%22%2C%22end_input%22%3A%222015-10-22%2015%3A25%22%2C%22step_input%22%3A%22%22%2C%22stacked%22%3Atrue%2C%22tab%22%3A0%7D%5D", + "refId": "E", + "step": 5, + "target": "" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Memory Distribution", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "transparent": false, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "bytes", + "label": "", + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "bytes", + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": {}, + "bars": true, + "datasource": "${DS_PROMETHEUS}", + "decimals": 2, + "editable": true, + "error": false, + "fill": 2, + "grid": { + "threshold1": null, + "threshold1Color": "rgb(241, 156, 15)", + "threshold2": null, + "threshold2Color": "rgb(246, 17, 17)", + "thresholdLine": true + }, + "id": 24, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "hideEmpty": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": false, + "linewidth": 2, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "Forks", + "color": "#EF843C" + } + ], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "calculatedInterval": "2m", + "datasourceErrors": {}, + "errors": {}, + "expr": "rate(node_forks{alias=\"$host\"}[$interval]) or irate(node_forks{alias=\"$host\"}[5m])", + "intervalFactor": 1, + "legendFormat": "Forks", + "metric": "", + "prometheusLink": "/api/datasources/proxy/1/graph#%5B%7B%22expr%22%3A%22node_procs_running%7Balias%3D%5C%22%24host%5C%22%7D%22%2C%22range_input%22%3A%2243200s%22%2C%22end_input%22%3A%222015-9-18%2013%3A46%22%2C%22step_input%22%3A%22%22%2C%22stacked%22%3Atrue%2C%22tab%22%3A0%7D%5D", + "refId": "A", + "step": 5, + "target": "" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Forks", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "transparent": false, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "none", + "label": "", + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "none", + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": {}, + "bars": true, + "datasource": "${DS_PROMETHEUS}", + "decimals": 2, + "editable": true, + "error": false, + "fill": 2, + "grid": { + "threshold1": null, + "threshold1Color": "rgb(241, 156, 15)", + "threshold2": null, + "threshold2Color": "rgb(246, 17, 17)", + "thresholdLine": true + }, + "id": 20, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "hideEmpty": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": false, + "linewidth": 2, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "Processes blocked waiting for I/O to complete", + "color": "#E24D42" + }, + { + "alias": "Processes in runnable state", + "color": "#6ED0E0" + } + ], + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "calculatedInterval": "2m", + "datasourceErrors": {}, + "errors": {}, + "expr": "node_procs_running{alias=\"$host\"}", + "intervalFactor": 1, + "legendFormat": "Processes in runnable state", + "metric": "", + "prometheusLink": "/api/datasources/proxy/1/graph#%5B%7B%22expr%22%3A%22node_procs_running%7Balias%3D%5C%22%24host%5C%22%7D%22%2C%22range_input%22%3A%2243200s%22%2C%22end_input%22%3A%222015-9-18%2013%3A46%22%2C%22step_input%22%3A%22%22%2C%22stacked%22%3Atrue%2C%22tab%22%3A0%7D%5D", + "refId": "A", + "step": 5, + "target": "" + }, + { + "calculatedInterval": "2m", + "datasourceErrors": {}, + "errors": {}, + "expr": "node_procs_blocked{alias=\"$host\"}", + "intervalFactor": 1, + "legendFormat": "Processes blocked waiting for I/O to complete", + "metric": "", + "prometheusLink": "/api/datasources/proxy/1/graph#%5B%7B%22expr%22%3A%22node_procs_blocked%7Balias%3D%5C%22%24host%5C%22%7D%22%2C%22range_input%22%3A%2243200s%22%2C%22end_input%22%3A%222015-9-18%2013%3A46%22%2C%22step_input%22%3A%22%22%2C%22stacked%22%3Atrue%2C%22tab%22%3A0%7D%5D", + "refId": "B", + "step": 5, + "target": "" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Processes", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "transparent": false, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "none", + "label": "", + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "none", + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_PROMETHEUS}", + "decimals": 2, + "editable": true, + "error": false, + "fill": 2, + "grid": { + "threshold1": null, + "threshold1Color": "rgb(241, 156, 15)", + "threshold2": null, + "threshold2Color": "rgb(246, 17, 17)", + "thresholdLine": true + }, + "id": 27, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "hideEmpty": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "calculatedInterval": "2m", + "datasourceErrors": {}, + "errors": {}, + "expr": "rate(node_context_switches{alias=\"$host\"}[$interval]) or irate(node_context_switches{alias=\"$host\"}[5m])", + "intervalFactor": 1, + "legendFormat": "Context Switches", + "metric": "", + "prometheusLink": "/api/datasources/proxy/1/graph#%5B%7B%22expr%22%3A%22node_procs_running%7Balias%3D%5C%22%24host%5C%22%7D%22%2C%22range_input%22%3A%2243200s%22%2C%22end_input%22%3A%222015-9-18%2013%3A46%22%2C%22step_input%22%3A%22%22%2C%22stacked%22%3Atrue%2C%22tab%22%3A0%7D%5D", + "refId": "A", + "step": 5, + "target": "" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Context Switches", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "transparent": false, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "none", + "label": "", + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "none", + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_PROMETHEUS}", + "decimals": 2, + "editable": true, + "error": false, + "fill": 2, + "grid": { + "threshold1": null, + "threshold1Color": "rgb(241, 156, 15)", + "threshold2": null, + "threshold2Color": "rgb(246, 17, 17)", + "thresholdLine": true + }, + "id": 28, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "hideEmpty": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "Interrupts", + "color": "#D683CE" + } + ], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "calculatedInterval": "2m", + "datasourceErrors": {}, + "errors": {}, + "expr": "rate(node_intr{alias=\"$host\"}[$interval]) or irate(node_intr{alias=\"$host\"}[5m])", + "intervalFactor": 1, + "legendFormat": "Interrupts", + "metric": "", + "prometheusLink": "/api/datasources/proxy/1/graph#%5B%7B%22expr%22%3A%22node_procs_running%7Balias%3D%5C%22%24host%5C%22%7D%22%2C%22range_input%22%3A%2243200s%22%2C%22end_input%22%3A%222015-9-18%2013%3A46%22%2C%22step_input%22%3A%22%22%2C%22stacked%22%3Atrue%2C%22tab%22%3A0%7D%5D", + "refId": "A", + "step": 5, + "target": "" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Interrupts", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "transparent": false, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "none", + "label": "", + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "none", + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_PROMETHEUS}", + "decimals": 2, + "editable": true, + "error": false, + "fill": 6, + "grid": { + "threshold1": null, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": null, + "threshold2Color": "rgba(234, 112, 112, 0.22)", + "thresholdLine": false + }, + "id": 21, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "hideEmpty": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "calculatedInterval": "2s", + "datasourceErrors": {}, + "errors": {}, + "expr": "rate(node_network_receive_bytes{alias=\"$host\", device!=\"lo\"}[$interval]) or irate(node_network_receive_bytes{alias=\"$host\", device!=\"lo\"}[5m])", + "intervalFactor": 1, + "legendFormat": "Inbound: {{ device }}", + "metric": "", + "prometheusLink": "/api/datasources/proxy/1/graph#%5B%7B%22expr%22%3A%22node_memory_MemFree%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Buffers%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Cached%7Balias%3D%5C%22%24host%5C%22%7D%22%2C%22range_input%22%3A%22900s%22%2C%22end_input%22%3A%222015-10-22%2015%3A25%22%2C%22step_input%22%3A%22%22%2C%22stacked%22%3Atrue%2C%22tab%22%3A0%7D%5D", + "refId": "B", + "step": 5, + "target": "" + }, + { + "calculatedInterval": "2s", + "datasourceErrors": {}, + "errors": {}, + "expr": "rate(node_network_transmit_bytes{alias=\"$host\", device!=\"lo\"}[$interval]) or irate(node_network_transmit_bytes{alias=\"$host\", device!=\"lo\"}[5m])", + "intervalFactor": 1, + "legendFormat": "Outbound: {{ device }}", + "metric": "", + "prometheusLink": "/api/datasources/proxy/1/graph#%5B%7B%22expr%22%3A%22node_memory_MemTotal%7Balias%3D%5C%22%24host%5C%22%7D%20-%20(node_memory_MemFree%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Buffers%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Cached%7Balias%3D%5C%22%24host%5C%22%7D)%22%2C%22range_input%22%3A%22900s%22%2C%22end_input%22%3A%222015-10-22%2015%3A25%22%2C%22step_input%22%3A%22%22%2C%22stacked%22%3Atrue%2C%22tab%22%3A0%7D%5D", + "refId": "A", + "step": 5, + "target": "" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Network Traffic", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "transparent": false, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "Bps", + "label": "", + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "bytes", + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": {}, + "bars": true, + "datasource": "${DS_PROMETHEUS}", + "decimals": 2, + "editable": true, + "error": false, + "fill": 6, + "grid": { + "threshold1": null, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": null, + "threshold2Color": "rgba(234, 112, 112, 0.22)", + "thresholdLine": false + }, + "id": 22, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "hideEmpty": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sort": "min", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": false, + "linewidth": 2, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "calculatedInterval": "2s", + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(increase(node_network_receive_bytes{alias=\"$host\", device!=\"lo\"}[1h]))", + "interval": "1h", + "intervalFactor": 1, + "legendFormat": "Received", + "metric": "", + "prometheusLink": "/api/datasources/proxy/1/graph#%5B%7B%22expr%22%3A%22node_memory_MemTotal%7Balias%3D%5C%22%24host%5C%22%7D%20-%20(node_memory_MemFree%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Buffers%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Cached%7Balias%3D%5C%22%24host%5C%22%7D)%22%2C%22range_input%22%3A%22900s%22%2C%22end_input%22%3A%222015-10-22%2015%3A25%22%2C%22step_input%22%3A%22%22%2C%22stacked%22%3Atrue%2C%22tab%22%3A0%7D%5D", + "refId": "A", + "step": 3600, + "target": "" + }, + { + "calculatedInterval": "2s", + "datasourceErrors": {}, + "errors": {}, + "expr": "sum(increase(node_network_transmit_bytes{alias=\"$host\", device!=\"lo\"}[1h]))", + "interval": "1h", + "intervalFactor": 1, + "legendFormat": "Sent", + "metric": "", + "prometheusLink": "/api/datasources/proxy/1/graph#%5B%7B%22expr%22%3A%22node_memory_MemTotal%7Balias%3D%5C%22%24host%5C%22%7D%20-%20(node_memory_MemFree%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Buffers%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Cached%7Balias%3D%5C%22%24host%5C%22%7D)%22%2C%22range_input%22%3A%22900s%22%2C%22end_input%22%3A%222015-10-22%2015%3A25%22%2C%22step_input%22%3A%22%22%2C%22stacked%22%3Atrue%2C%22tab%22%3A0%7D%5D", + "refId": "B", + "step": 3600, + "target": "" + } + ], + "timeFrom": "24h", + "timeShift": null, + "title": "Network Utilization Hourly", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "transparent": false, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "bytes", + "label": "", + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "bytes", + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_PROMETHEUS}", + "decimals": 2, + "editable": true, + "error": false, + "fill": 6, + "grid": { + "threshold1": null, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": null, + "threshold2Color": "rgba(234, 112, 112, 0.22)", + "thresholdLine": false + }, + "id": 23, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "hideEmpty": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "Used", + "color": "#584477" + }, + { + "alias": "Free", + "color": "#AEA2E0" + } + ], + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "calculatedInterval": "2s", + "datasourceErrors": {}, + "errors": {}, + "expr": "node_memory_SwapTotal{alias=\"$host\"} - node_memory_SwapFree{alias=\"$host\"}", + "intervalFactor": 1, + "legendFormat": "Used", + "metric": "", + "prometheusLink": "/api/datasources/proxy/1/graph#%5B%7B%22expr%22%3A%22node_memory_MemTotal%7Balias%3D%5C%22%24host%5C%22%7D%20-%20(node_memory_MemFree%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Buffers%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Cached%7Balias%3D%5C%22%24host%5C%22%7D)%22%2C%22range_input%22%3A%22900s%22%2C%22end_input%22%3A%222015-10-22%2015%3A25%22%2C%22step_input%22%3A%22%22%2C%22stacked%22%3Atrue%2C%22tab%22%3A0%7D%5D", + "refId": "A", + "step": 5, + "target": "" + }, + { + "calculatedInterval": "2s", + "datasourceErrors": {}, + "errors": {}, + "expr": "node_memory_SwapFree{alias=\"$host\"}", + "intervalFactor": 1, + "legendFormat": "Free", + "metric": "", + "prometheusLink": "/api/datasources/proxy/1/graph#%5B%7B%22expr%22%3A%22node_memory_MemFree%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Buffers%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Cached%7Balias%3D%5C%22%24host%5C%22%7D%22%2C%22range_input%22%3A%22900s%22%2C%22end_input%22%3A%222015-10-22%2015%3A25%22%2C%22step_input%22%3A%22%22%2C%22stacked%22%3Atrue%2C%22tab%22%3A0%7D%5D", + "refId": "B", + "step": 5, + "target": "" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Swap", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "transparent": false, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "bytes", + "label": "", + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "bytes", + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_PROMETHEUS}", + "decimals": 2, + "editable": true, + "error": false, + "fill": 2, + "grid": { + "threshold1": null, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": null, + "threshold2Color": "rgba(234, 112, 112, 0.22)", + "thresholdLine": false + }, + "id": 30, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "hideEmpty": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "calculatedInterval": "2s", + "datasourceErrors": {}, + "errors": {}, + "expr": "rate(node_vmstat_pswpin{alias=\"$host\"}[$interval]) * 4096 or irate(node_vmstat_pswpin{alias=\"$host\"}[5m]) * 4096", + "intervalFactor": 1, + "legendFormat": "Swap In", + "metric": "", + "prometheusLink": "/api/datasources/proxy/1/graph#%5B%7B%22expr%22%3A%22node_memory_MemTotal%7Balias%3D%5C%22%24host%5C%22%7D%20-%20(node_memory_MemFree%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Buffers%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Cached%7Balias%3D%5C%22%24host%5C%22%7D)%22%2C%22range_input%22%3A%22900s%22%2C%22end_input%22%3A%222015-10-22%2015%3A25%22%2C%22step_input%22%3A%22%22%2C%22stacked%22%3Atrue%2C%22tab%22%3A0%7D%5D", + "refId": "A", + "step": 5, + "target": "" + }, + { + "calculatedInterval": "2s", + "datasourceErrors": {}, + "errors": {}, + "expr": "rate(node_vmstat_pswpout{alias=\"$host\"}[$interval]) * 4096 or irate(node_vmstat_pswpout{alias=\"$host\"}[5m]) * 4096", + "intervalFactor": 1, + "legendFormat": "Swap Out", + "metric": "", + "prometheusLink": "/api/datasources/proxy/1/graph#%5B%7B%22expr%22%3A%22node_memory_MemFree%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Buffers%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Cached%7Balias%3D%5C%22%24host%5C%22%7D%22%2C%22range_input%22%3A%22900s%22%2C%22end_input%22%3A%222015-10-22%2015%3A25%22%2C%22step_input%22%3A%22%22%2C%22stacked%22%3Atrue%2C%22tab%22%3A0%7D%5D", + "refId": "B", + "step": 5, + "target": "" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Swap Activity", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "transparent": false, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "Bps", + "label": "", + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "bytes", + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_PROMETHEUS}", + "decimals": 2, + "editable": true, + "error": false, + "fill": 2, + "grid": { + "threshold1": null, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": null, + "threshold2Color": "rgba(234, 112, 112, 0.22)", + "thresholdLine": false + }, + "id": 31, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "hideEmpty": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "calculatedInterval": "2s", + "datasourceErrors": {}, + "errors": {}, + "expr": "rate(node_vmstat_pgpgin{alias=\"$host\"}[$interval]) * 1024 or irate(node_vmstat_pgpgin{alias=\"$host\"}[5m]) * 1024", + "intervalFactor": 1, + "legendFormat": "Page In", + "metric": "", + "prometheusLink": "/api/datasources/proxy/1/graph#%5B%7B%22expr%22%3A%22node_memory_MemTotal%7Balias%3D%5C%22%24host%5C%22%7D%20-%20(node_memory_MemFree%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Buffers%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Cached%7Balias%3D%5C%22%24host%5C%22%7D)%22%2C%22range_input%22%3A%22900s%22%2C%22end_input%22%3A%222015-10-22%2015%3A25%22%2C%22step_input%22%3A%22%22%2C%22stacked%22%3Atrue%2C%22tab%22%3A0%7D%5D", + "refId": "A", + "step": 5, + "target": "" + }, + { + "calculatedInterval": "2s", + "datasourceErrors": {}, + "errors": {}, + "expr": "rate(node_vmstat_pgpgout{alias=\"$host\"}[$interval]) * 1024 or irate(node_vmstat_pgpgout{alias=\"$host\"}[5m]) * 1024", + "intervalFactor": 1, + "legendFormat": "Page Out", + "metric": "", + "prometheusLink": "/api/datasources/proxy/1/graph#%5B%7B%22expr%22%3A%22node_memory_MemFree%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Buffers%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Cached%7Balias%3D%5C%22%24host%5C%22%7D%22%2C%22range_input%22%3A%22900s%22%2C%22end_input%22%3A%222015-10-22%2015%3A25%22%2C%22step_input%22%3A%22%22%2C%22stacked%22%3Atrue%2C%22tab%22%3A0%7D%5D", + "refId": "B", + "step": 5, + "target": "" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "I/O Activity", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "transparent": false, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "Bps", + "label": "", + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "bytes", + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + } + ], + "title": "New row" + } + ], + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": { + "collapse": false, + "enable": true, + "notice": false, + "now": true, + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "status": "Stable", + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ], + "type": "timepicker" + }, + "templating": { + "list": [ + { + "allFormat": "glob", + "auto": true, + "auto_count": 200, + "auto_min": "1s", + "current": { + "selected": true, + "text": "5s", + "value": "5s" + }, + "datasource": "Prometheus", + "hide": 0, + "includeAll": false, + "label": "Interval", + "multi": false, + "multiFormat": "glob", + "name": "interval", + "options": [ + { + "selected": false, + "text": "auto", + "value": "$__auto_interval" + }, + { + "selected": false, + "text": "1s", + "value": "1s" + }, + { + "selected": true, + "text": "5s", + "value": "5s" + }, + { + "selected": false, + "text": "1m", + "value": "1m" + }, + { + "selected": false, + "text": "5m", + "value": "5m" + }, + { + "selected": false, + "text": "1h", + "value": "1h" + }, + { + "selected": false, + "text": "6h", + "value": "6h" + }, + { + "selected": false, + "text": "1d", + "value": "1d" + } + ], + "query": "1s,5s,1m,5m,1h,6h,1d", + "refresh": 0, + "type": "interval" + }, + { + "allFormat": "glob", + "current": {}, + "datasource": "${DS_PROMETHEUS}", + "hide": 0, + "includeAll": false, + "label": "Host", + "multi": false, + "multiFormat": "regex values", + "name": "host", + "options": [], + "query": "label_values(alias)", + "refresh": 1, + "refresh_on_load": false, + "regex": "", + "tagValuesQuery": "alias", + "tagsQuery": "up", + "type": "query", + "useTags": false + } + ] + }, + "annotations": { + "list": [ + { + "datasource": "${DS_PROMETHEUS}", + "enable": false, + "expr": "ALERTS{alias=\"$host\", alertstate=\"firing\"}", + "iconColor": "rgb(252, 5, 0)", + "name": "Alert", + "tagKeys": "severity", + "textFormat": "{{ alias }} : {{alertstate}}", + "titleFormat": "{{ alertname }}" + }, + { + "datasource": "${DS_PROMETHEUS}", + "enable": true, + "expr": "ALERTS{alias=\"$host\",alertstate=\"pending\"}", + "iconColor": "rgb(228, 242, 9)", + "name": "Warning", + "tagKeys": "severity", + "textFormat": "{{ alias }} : {{ alertstate }}", + "titleFormat": "{{ alertname }}" + } + ] + }, + "refresh": "30s", + "schemaVersion": 12, + "version": 18, + "links": [], + "gnetId": 159, + "description": "Prometheus for system metrics. \r\nLoad, CPU, RAM, network, process ... " +} \ No newline at end of file diff --git a/monitor/install-collectd-client.sh b/monitor/install-collectd-client.sh deleted file mode 100644 index 00fa4c88..00000000 --- a/monitor/install-collectd-client.sh +++ /dev/null @@ -1,8 +0,0 @@ -MONITOR_CONFIG="/etc/collectd-config" - -# Collectd -sudo docker run --name bottlenecks-automated-collectd -d \ - --privileged \ - -v ${MONITOR_CONFIG}:/etc/collectd:ro \ - -v /proc:/mnt/proc:ro \ - fr3nd/collectd:5.5.0-1 diff --git a/monitor/install_collectd_client.sh b/monitor/install_collectd_client.sh new file mode 100644 index 00000000..3861f987 --- /dev/null +++ b/monitor/install_collectd_client.sh @@ -0,0 +1,8 @@ +MONITOR_CONFIG="/etc/collectd_config" + +# Collectd +sudo docker run --name bottlenecks-automated-collectd -d \ + --privileged \ + -v ${MONITOR_CONFIG}:/etc/collectd:ro \ + -v /proc:/mnt/proc:ro \ + fr3nd/collectd:5.5.0-1 diff --git a/monitor/monitoring.sh b/monitor/monitoring.sh index 01c1edc3..9abe49d9 100644 --- a/monitor/monitoring.sh +++ b/monitor/monitoring.sh @@ -64,7 +64,7 @@ sudo docker run \ python client_ip_configure.py barometer_client.conf # Configure IP Address in barometer server configuration -python server_ip_configure.py barometer-collectd.conf +python server_ip_configure.py barometer_collectd.conf # Automate Collectd Client python automate_collectd_client.py @@ -73,10 +73,10 @@ python automate_collectd_client.py python automate_cadvisor_client.py # Automate Barometer installation for jump server -bash ./barometer-install-script.sh +bash ./barometer_install_script.sh # Automate Barometer installation for compute/controller nodes python barometer_automated_client_install.py # Automate Prometheus Datasource and Grafana Dashboard creation -python automated-dashboard-datasource.py +python automated_dashboard_datasource.py diff --git a/monitor/server_ip_configure.py b/monitor/server_ip_configure.py index 4e8d630a..62aa6288 100644 --- a/monitor/server_ip_configure.py +++ b/monitor/server_ip_configure.py @@ -10,18 +10,16 @@ import fileinput import re import logging import socket -import requests -from oslo_serialization import jsonutils logger = logging.getLogger(__name__) ip_address = socket.gethostbyname(socket.gethostname()) for line in fileinput.input(inplace=1): - ip = " Listen \"" + str(ip_address) +"\" \"25826\"" - line = re.sub(r'.*Listen.*25826.*', r''+str(ip), line.rstrip()) + ip = " Listen \"" + str(ip_address) + "\" \"25826\"" + line = re.sub(r'.*Listen.*25826.*', r'' + str(ip), line.rstrip()) print(line) for line in fileinput.input(inplace=1): - ip = " URL \"http://"+str(ip_address)+":9103/collectd-post\"" - line = re.sub(r'.*URL.*collectd-post.*', r''+str(ip), line.rstrip()) + ip = " URL \"http://" + str(ip_address) + ":9103/collectd-post\"" + line = re.sub(r'.*URL.*collectd-post.*', r'' + str(ip), line.rstrip()) print(line) -- cgit 1.2.3-korg