Skip to content
Snippets Groups Projects
Commit 87940c3f authored by Nikolay Stanchev's avatar Nikolay Stanchev
Browse files

Merging integration into clmcservice

parents a050d439 77a5cae1
No related branches found
No related tags found
No related merge requests found
......@@ -39,7 +39,7 @@ def telegraf_agent_config(request):
:return: the python object representing the read YAML file
"""
rspec = pkg_resources.resource_filename('clmctest', 'rspec.json')
print("rspec file: {0}".format(rspec))
print("\nrspec file: {0}".format(rspec))
with open(rspec, 'r') as stream:
data_loaded = json.load(stream)
return data_loaded
......
......@@ -63,8 +63,9 @@ def test_ping(telegraf_agent_config):
('net', 'SELECT mean("bytes_sent") AS "mean" FROM "CLMCMetrics"."autogen"."net"', 0),
('disk', 'SELECT mean("free") AS "mean" FROM "CLMCMetrics"."autogen"."disk"', 0),
('mem', 'SELECT mean("free") AS "mean" FROM "CLMCMetrics"."autogen"."mem"', 0),
('service_config_state', 'SELECT mean("loaded.active.running_count") AS "mean" FROM "CLMCMetrics"."autogen"."service_config_state" WHERE "resource"=\'nginx.service\'', 0),
# Report MINIO's HTTP request response time (as a rolling difference of the sum total)
('minio_http_requests_duration_seconds', 'SELECT difference(max("sum")) AS "mean" FROM "CLMCMetrics"."autogen"."minio_http_requests_duration_seconds" WHERE time > now() - 1h GROUP BY time(10s)',0),
('minio_http_requests_duration_seconds', 'SELECT difference(max("sum")) AS "mean" FROM "CLMCMetrics"."autogen"."minio_http_requests_duration_seconds" WHERE time > now() - 1h GROUP BY time(10s)',0),
# Report the average change in difference of MINIO's HTTP response time (the inner query determines a rolling difference between sampling periods [respTimeDiff])
('minio_http_requests_duration_seconds', 'SELECT mean("respTimeDiff") AS "mean" FROM (SELECT difference(max("sum")) AS "respTimeDiff" FROM "CLMCMetrics"."autogen"."minio_http_requests_duration_seconds" WHERE time > now() - 1h GROUP BY time(10s))',0)
])
......
......@@ -68,7 +68,7 @@ def simulator(streaming_sim_config):
:return: an instance of the simulator
"""
influx_url = "http://" + streaming_sim_config[0]['ip_address'] + ":8086"
influx_url = "http://" + streaming_sim_config[0]['ip_address'] + ":8086"
for service in streaming_sim_config:
if service['name'] == "ipendpoint1":
......
## © University of Southampton IT Innovation Centre, 2018
##
## Copyright in this software belongs to University of Southampton
## IT Innovation Centre of Gamma House, Enterprise Road,
## Chilworth Science Park, Southampton, SO16 7NS, UK.
##
## This software may not be used, sold, licensed, transferred, copied
## or reproduced in whole or in part in any manner or form or in or
## on any media by any person other than in accordance with the terms
## of the Licence Agreement supplied with the software, or otherwise
## without the prior written consent of the copyright owners.
##
## This software is distributed WITHOUT ANY WARRANTY, without even the
## implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
## PURPOSE, except where stated in the Licence Agreement supplied with
## the software.
##
## Created By : Michael Boniface
## Created Date : 20-03-2018
## Created for Project : FLAME
###############################################################################
# INPUTS #
###############################################################################
# # Read metrics about network interface usage
[[inputs.net]]
# ## By default, telegraf gathers stats from any up interface (excluding loopback)
# ## Setting interfaces will tell it to gather these explicit interfaces,
# ## regardless of status.
# ##
# # interfaces = ["eth0"]
# Read metrics about cpu usage
[[inputs.cpu]]
## Whether to report per-cpu stats or not
percpu = true
......@@ -39,26 +6,18 @@
## If true, collect raw CPU time metrics.
collect_cpu_time = false
## If true, compute and report the sum of all non-idle CPU states.
#report_active = false
# Read metrics about disk usage by mount point
report_active = false
[[inputs.disk]]
## By default, telegraf gather stats for all mountpoints.
## Setting mountpoints will restrict the stats to the specified mountpoints.
## By default stats will be gathered for all mount points.
## Set mount_points will restrict the stats to only the specified mount points.
# mount_points = ["/"]
## Ignore some mountpoints by filesystem type. For example (dev)tmpfs (usually
## present on /run, /var/run, /dev/shm or /dev).
## Ignore mount points by filesystem type.
ignore_fs = ["tmpfs", "devtmpfs", "devfs"]
# Read metrics about disk IO by device
[[inputs.diskio]]
## By default, telegraf will gather stats for all devices including
## disk partitions.
## Setting devices will restrict the stats to the specified devices.
# devices = ["sda", "sdb"]
devices = ["sda1"]
## Uncomment the following line if you need disk serial numbers.
# skip_serial_number = false
#
......@@ -78,23 +37,21 @@
## The typical use case is for LVM volumes, to get the VG/LV name instead of
## the near-meaningless DM-0 name.
# name_templates = ["$ID_FS_LABEL","$DM_VG_NAME/$DM_LV_NAME"]
# Read metrics about memory usage
[[inputs.kernel]]
# no configuration
[[inputs.mem]]
# no configuration
[[inputs.processes]]
# no configuration
[[inputs.swap]]
# no configuration
[[inputs.system]]
# no configuration
[[inputs.net]]
[[inputs.netstat]]
# no configuration
# # Influx HTTP write listener
[[inputs.http_listener]]
## Address and port to host HTTP listener on
service_address = ":8186"
## timeouts
read_timeout = "10s"
write_timeout = "10s"
## HTTPS
#tls_cert= "/etc/telegraf/cert.pem"
#tls_key = "/etc/telegraf/key.pem"
## MTLS
#tls_allowed_cacerts = ["/etc/telegraf/clientca.pem"]
\ No newline at end of file
# Influx HTTP write listener
# [[inputs.http_listener]]
# ## Address and port to host HTTP listener on
# service_address = ":8186"
......@@ -20,4 +20,18 @@
## Created for Project : FLAME
[[inputs.prometheus]]
urls = ["http://localhost:9000/minio/prometheus/metrics"]
\ No newline at end of file
urls = ["http://localhost:9000/minio/prometheus/metrics"]
[[inputs.procstat]]
#pid_file = "/var/run/nginx.pid"
exe = "minio"
# [[inputs.systemctl]]
# ## Service array
# services = [
# "minio.service"
# ]
# ## Sample rate for sampling state of service.
# ## Must be greter that the collection_interval/2
# #sample_rate = 2
\ No newline at end of file
......@@ -23,11 +23,21 @@
[[inputs.nginx]]
## An array of Nginx stub_status URI to gather stats.
urls = ["http://localhost:80/nginx_status"]
## HTTP response timeout (default: 5s)
# response_timeout = "5s"
# response_timeout = "5s"
[[inputs.procstat]]
#pid_file = "/var/run/nginx.pid"
exe = "nginx"
# # Influx HTTP write listener
[[inputs.http_listener]]
## Address and port to host HTTP listener on
service_address = ":8186"
\ No newline at end of file
[[inputs.systemctl]]
services = [
"nginx.service",
]
## Sample rate for sampling state of service.
## Must be greter that the collection_interval/2
sample_rate = 2
## Logging level for this plugin according to logrus log levels
## "debug", "info", "warning", "error", "fatal", "panic"
log_level = "debug"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment