From abdc1967f42cf1d71067e1d697ed1981c2c57862 Mon Sep 17 00:00:00 2001 From: Nikolay Stanchev <ns17@it-innovation.soton.ac.uk> Date: Wed, 5 Sep 2018 12:21:54 +0100 Subject: [PATCH] Updates nginx.conf and tick stack installation to expose chronograf --- docs/clmc-service.md | 4 ++++ scripts/clmc-service/install-tick-stack.sh | 6 +++++- scripts/clmc-service/nginx.conf | 8 ++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/docs/clmc-service.md b/docs/clmc-service.md index e99b485..e1b21a4 100644 --- a/docs/clmc-service.md +++ b/docs/clmc-service.md @@ -346,6 +346,10 @@ configuration files of the service can be found in the **src/service** folder. } ``` +* Generating network measurements + + To generate network measurements, which are then used to create the network topology in the Neo4j graph, refer to + the src/service/clmcservice/generate_network_measurements.py script. An example configuration file is src/service/resources/GraphAPI/network_config.json ## CRUD API for service function endpoint configurations diff --git a/scripts/clmc-service/install-tick-stack.sh b/scripts/clmc-service/install-tick-stack.sh index 0f60ae3..2ca0c54 100755 --- a/scripts/clmc-service/install-tick-stack.sh +++ b/scripts/clmc-service/install-tick-stack.sh @@ -45,9 +45,13 @@ if [ $? == 1 ]; then fi dpkg -i chronograf_${CHRONOGRAF_VERSION}_amd64.deb +# configure Chronograf systemd service file +sed -i 's/^ExecStart.*/ExecStart=\/usr\/bin\/chronograf --basepath=\/chronograf --prefix-routes $CHRONOGRAF_OPTS/' /lib/systemd/system/chronograf.service +systemctl daemon-reload + systemctl start influxdb systemctl start kapacitor -systemctl start chronograf +systemctl restart chronograf # wait for kapacitor to start while ! nc -z localhost 9092 diff --git a/scripts/clmc-service/nginx.conf b/scripts/clmc-service/nginx.conf index 35dd1ff..3cb407f 100644 --- a/scripts/clmc-service/nginx.conf +++ b/scripts/clmc-service/nginx.conf @@ -55,5 +55,13 @@ http { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Host $server_name; } + location /chronograf { + proxy_pass http://127.0.0.1:8888; # No trailing slash - chronograf is configured to include /chronograf in its routes + proxy_redirect off; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Host $server_name; + } } } \ No newline at end of file -- GitLab