From 66e28eeeb68d91c7837e1f0cba3eede6bd7418e7 Mon Sep 17 00:00:00 2001 From: MJB <mjb@it-innovation.soton.ac.uk> Date: Tue, 23 Jan 2018 14:21:09 +0000 Subject: [PATCH] added apache monitoring --- Vagrantfile | 15 +++++++++++++-- docs/monitoring.md | 2 +- scripts/influx/telegraf_ipendpoint1.conf | 22 +++++++++++++++++++++- scripts/influx/telegraf_ipendpoint2.conf | 22 +++++++++++++++++++++- 4 files changed, 56 insertions(+), 5 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index a22f845..6a52713 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -26,7 +26,7 @@ Vagrant.configure("2") do |config| config.vm.box = "ubuntu/xenial64" - config.vm.define "clmc" do |my| + config.vm.define "clmc-service" do |my| config.vm.network :private_network, ip: "192.168.50.10", virtualbox__intnet: "clmc-net" @@ -60,6 +60,12 @@ Vagrant.configure("2") do |config| v.customize ["modifyvm", :id, "--cpus", 1] end + # open apache port + config.vm.network "forwarded_port", guest: 80, host: 8080 + + # install the apache service + config.vm.provision :shell, :path => 'scripts/apache/install-apache.sh' + # Install CLMC agent 1 config.vm.provision :shell, :path => 'scripts/influx/install-clmc-agent.sh', :args => "/vagrant/scripts/influx/telegraf_ipendpoint1.conf" end @@ -73,8 +79,13 @@ Vagrant.configure("2") do |config| v.customize ["modifyvm", :id, "--cpus", 1] end + # open apache port + config.vm.network "forwarded_port", guest: 80, host: 8081 + + # install the apache service + config.vm.provision :shell, :path => 'scripts/apache/install-apache.sh' + # Install CLMC agent 2 config.vm.provision :shell, :path => 'scripts/influx/install-clmc-agent.sh', :args => "/vagrant/scripts/influx/telegraf_ipendpoint2.conf" end - end diff --git a/docs/monitoring.md b/docs/monitoring.md index 7ed9dea..e116d73 100644 --- a/docs/monitoring.md +++ b/docs/monitoring.md @@ -639,7 +639,7 @@ Fields Specific Tags * service_state -**<prefix>_service_mond** +**<prefix>_service_mon** Each SF developed will measure service specific usage and performance measurements. diff --git a/scripts/influx/telegraf_ipendpoint1.conf b/scripts/influx/telegraf_ipendpoint1.conf index 7844869..acd6410 100644 --- a/scripts/influx/telegraf_ipendpoint1.conf +++ b/scripts/influx/telegraf_ipendpoint1.conf @@ -113,4 +113,24 @@ ## MTLS #tls_allowed_cacerts = ["/etc/telegraf/clientca.pem"] - \ No newline at end of file + +# Read Apache status information (mod_status) +[[inputs.apache]] + ## An array of URLs to gather from, must be directed at the machine + ## readable version of the mod_status page including the auto query string. + ## Default is "http://localhost/server-status?auto". + urls = ["http://localhost/server-status?auto"] + + ## Credentials for basic HTTP authentication. + # username = "myuser" + # password = "mypassword" + + ## Maximum time to receive response. + # response_timeout = "5s" + + ## Optional SSL Config + # ssl_ca = "/etc/telegraf/ca.pem" + # ssl_cert = "/etc/telegraf/cert.pem" + # ssl_key = "/etc/telegraf/key.pem" + ## Use SSL but skip chain & host verification + # insecure_skip_verify = false \ No newline at end of file diff --git a/scripts/influx/telegraf_ipendpoint2.conf b/scripts/influx/telegraf_ipendpoint2.conf index e0d62af..2299a52 100644 --- a/scripts/influx/telegraf_ipendpoint2.conf +++ b/scripts/influx/telegraf_ipendpoint2.conf @@ -113,4 +113,24 @@ ## MTLS #tls_allowed_cacerts = ["/etc/telegraf/clientca.pem"] - \ No newline at end of file + + # Read Apache status information (mod_status) +[[inputs.apache]] + ## An array of URLs to gather from, must be directed at the machine + ## readable version of the mod_status page including the auto query string. + ## Default is "http://localhost/server-status?auto". + urls = ["http://localhost/server-status?auto"] + + ## Credentials for basic HTTP authentication. + # username = "myuser" + # password = "mypassword" + + ## Maximum time to receive response. + # response_timeout = "5s" + + ## Optional SSL Config + # ssl_ca = "/etc/telegraf/ca.pem" + # ssl_cert = "/etc/telegraf/cert.pem" + # ssl_key = "/etc/telegraf/key.pem" + ## Use SSL but skip chain & host verification + # insecure_skip_verify = false \ No newline at end of file -- GitLab