diff --git a/scripts/clmc-agent/install-clmc-agent.sh b/scripts/clmc-agent/install-clmc-agent.sh index ab3d0bdcecd807e2323da45807e62c8eb2a17060..9626d91cab2f3814483c477645b8ba370df8d028 100644 --- a/scripts/clmc-agent/install-clmc-agent.sh +++ b/scripts/clmc-agent/install-clmc-agent.sh @@ -41,7 +41,7 @@ IP_ENDPOINT_ID=$7 INFLUXDB_URL=$8 DATABASE_NAME=$9 -if [ ! -f $TELEGRAF_CONF_FILE]; then +if [ ! -f $TELEGRAF_CONF_FILE ]; then echo "Error: Telegraf conf template file not found: "$TELEGRAF_CONF_FILE exit fi diff --git a/test/services/nginx/install-nginx.sh b/test/services/nginx/install-nginx.sh index 8cecfdfdc6a14c68cf28a65f26fed4102217e1b7..318996f4ad6e3804bf5a7cf51febe59586a1af8a 100644 --- a/test/services/nginx/install-nginx.sh +++ b/test/services/nginx/install-nginx.sh @@ -30,7 +30,8 @@ yes Y | sudo apt-get install nginx # Need to set up basic stats as this not configured by default # http://nginx.org/en/docs/http/ngx_http_stub_status_module.html - +echo "Coping new config file into nginx" +cd /vagrant sudo rm ../etc/nginx/nginx.conf sudo cp test/services/nginx/nginx.conf ../etc/nginx/nginx.conf #cat test/services/nginx/nginx.conf > ../etc/nginx/nginx.conf @@ -44,6 +45,7 @@ sudo systemctl start nginx #nginx -V 2>&1 | grep -o with-http_stub_status_module #/vagrant/../etc/nginx/nginx.config +# systemctl status telegraf -l diff --git a/test/services/nginx/telegraf_nginx_template.conf b/test/services/nginx/telegraf_nginx_template.conf index 31c97d16ee761205e56d77adba38f74d950705bb..8331ab29985783c3b76a486b846086f15b207855 100644 --- a/test/services/nginx/telegraf_nginx_template.conf +++ b/test/services/nginx/telegraf_nginx_template.conf @@ -58,7 +58,7 @@ ## Run telegraf in quiet mode quiet = false ## Specify the log file name. The empty string means to log to stdout. - logfile = "G:/Telegraf/telegraf.log" + logfile = "/etc/telegraf/telegraf.log" ## Override default hostname, if empty use os.Hostname() hostname = "" @@ -91,7 +91,6 @@ # Set UDP payload size, defaults to InfluxDB UDP Client default (512 bytes) # udp_payload = 512 - ############################################################################### # INPUTS # ############################################################################### @@ -104,24 +103,10 @@ 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"] - # Read Nginx's basic status information (ngx_http_stub_status_module) [[inputs.nginx]] ## An array of Nginx stub_status URI to gather stats. - urls = ["http://localhost/server_status"] - - ## 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 + urls = ["http://localhost:8083/nginx_status"] ## HTTP response timeout (default: 5s) response_timeout = "5s" \ No newline at end of file