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/mongo/install-mongo.sh b/test/services/mongo/install-mongo.sh index 25797d14568ba3fbc8b84dec1d2f5e969a861180..e00502fe6746d41101372afe1f88a7ffcec11a1a 100644 --- a/test/services/mongo/install-mongo.sh +++ b/test/services/mongo/install-mongo.sh @@ -30,3 +30,4 @@ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF50 echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.6 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.6.list sudo apt-get update sudo apt-get install -y mongodb-org +sudo service mongod start \ No newline at end of file diff --git a/test/services/nginx/install-nginx.sh b/test/services/nginx/install-nginx.sh index 5f44ce11d0a7fdf02e9c6d3cc306c9939263452a..318996f4ad6e3804bf5a7cf51febe59586a1af8a 100644 --- a/test/services/nginx/install-nginx.sh +++ b/test/services/nginx/install-nginx.sh @@ -30,8 +30,23 @@ 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 -nginx -s reload + +sudo nginx -s reload # start NGINX -systemctl start nginx \ No newline at end of file +sudo systemctl start nginx +# --with-http_stub_status_module +#nginx -V 2>&1 | grep -o with-http_stub_status_module +#/vagrant/../etc/nginx/nginx.config + +# systemctl status telegraf -l + + + +# dpkg -l | grep -c nginx \ No newline at end of file diff --git a/test/services/nginx/nginx.conf b/test/services/nginx/nginx.conf new file mode 100644 index 0000000000000000000000000000000000000000..1c906bec4096ecd77a0eb8d46c091288841b92d5 --- /dev/null +++ b/test/services/nginx/nginx.conf @@ -0,0 +1,14 @@ + + +events { + worker_connections 4096; ## Default: 1024 +} +http { + server { + location /nginx_status { + stub_status on; + access_log off; + allow all; + } + } +} \ No newline at end of file diff --git a/test/services/nginx/telegraf_nginx_template.conf b/test/services/nginx/telegraf_nginx_template.conf index 31c97d16ee761205e56d77adba38f74d950705bb..afd25312a419bf358bb8a4dfc57c1193245182ee 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:80/nginx_status"] ## HTTP response timeout (default: 5s) - response_timeout = "5s" \ No newline at end of file +# response_timeout = "5s" \ No newline at end of file