Add Prelim Elasticsearch Support

This commit is contained in:
Benjamin Hays 2024-02-16 17:58:12 -05:00
parent ba16b40552
commit c19d8625f2
6 changed files with 25 additions and 4 deletions

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "Configs/elk-stack/docker-elk"]
path = Configs/elk-stack/docker-elk
url = https://github.com/deviantony/docker-elk.git

View File

View File

@ -9,7 +9,7 @@
tags: docker tags: docker
- name: Install Docker - name: Install Docker
apt: apt:
name: docker name: docker-compose
state: latest state: latest
tags: docker tags: docker
- name: Ensure Docker service is enabled and started - name: Ensure Docker service is enabled and started

View File

@ -3,6 +3,7 @@
[linux] [linux]
10.0.1.2 10.0.1.2
10.0.1.3
10.0.1.12 10.0.1.12
10.0.1.13 10.0.1.13
10.0.1.14 10.0.1.14
@ -13,5 +14,7 @@
10.0.1.2 10.0.1.2
[grafana] [grafana]
10.0.1.2 10.0.1.3
[elasticsearch]
10.0.1.3

View File

@ -1,15 +1,29 @@
#!/bin/bash #!/bin/bash
# run Grafana/InfluxDB for metric collection and observation
# Check if port 3000 is open # Check if port 3000 is open
if lsof -Pi :3000 -sTCP:LISTEN -t >/dev/null ; then if lsof -Pi :3000 -sTCP:LISTEN -t >/dev/null ; then
echo "Port 3000 is already in use. Stopping existing Grafana instance..." echo "Port 3000 is already in use. Stopping existing Grafana instance..."
docker stop grafana docker stop grafana
docker stop influxdb
docker rm grafana
docker rm influxdb
else else
# Create a Docker volume for Grafana storage # Create Docker volumes
docker volume create grafana-storage docker volume create grafana-storage
docker volume create influxdb-storage
fi fi
# Run Grafana container # Run Grafana container
docker run -d -p 3000:3000 --name=grafana \ docker run -d -p 3000:3000 --name=grafana \
--volume grafana-storage:/var/lib/grafana \ --volume grafana-storage:/var/lib/grafana \
grafana/grafana-enterprise grafana/grafana-enterprise
# Run InfluxDB container
docker run -d \
--name influxdb \
-p 8086:8086 \
-p 8089:8089/udp \
--volume influxdb-storage:/var/lib/influxdb2 \
influxdb:latest

@ -0,0 +1 @@
Subproject commit 5da1badcf9e835047d07d7c34eb0e38583867cc5