mirror of https://github.com/OpenVidu/openvidu.git
deployment-pro: Add NGINX monitoring
parent
03ba1578fd
commit
70d30a5d6c
|
@ -1,3 +1,25 @@
|
||||||
|
filebeat.autodiscover:
|
||||||
|
providers:
|
||||||
|
- type: docker
|
||||||
|
hints.enabled: true
|
||||||
|
templates:
|
||||||
|
- condition:
|
||||||
|
contains:
|
||||||
|
docker.container.name: "nginx"
|
||||||
|
config:
|
||||||
|
- module: nginx
|
||||||
|
access:
|
||||||
|
input:
|
||||||
|
type: docker
|
||||||
|
containers:
|
||||||
|
ids: "${data.docker.container.id}"
|
||||||
|
stream: "stdout"
|
||||||
|
error:
|
||||||
|
input:
|
||||||
|
type: docker
|
||||||
|
containers:
|
||||||
|
ids: "${data.docker.container.id}"
|
||||||
|
stream: "stderr"
|
||||||
filebeat.inputs:
|
filebeat.inputs:
|
||||||
- type: container
|
- type: container
|
||||||
paths:
|
paths:
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
metricbeat.modules:
|
||||||
|
- module: nginx
|
||||||
|
metricsets: ["stubstatus"]
|
||||||
|
enabled: true
|
||||||
|
period: 10s
|
||||||
|
hosts: ["http://127.0.0.1"]
|
||||||
|
server_status_path: "nginx_status"
|
||||||
|
output:
|
||||||
|
elasticsearch:
|
||||||
|
hosts: ["${OPENVIDU_PRO_ELASTICSEARCH_HOST}"]
|
|
@ -138,6 +138,25 @@ services:
|
||||||
options:
|
options:
|
||||||
max-size: "${DOCKER_LOGS_MAX_SIZE:-100M}"
|
max-size: "${DOCKER_LOGS_MAX_SIZE:-100M}"
|
||||||
|
|
||||||
|
metricbeat:
|
||||||
|
image: docker.elastic.co/beats/metricbeat-oss:7.8.0
|
||||||
|
network_mode: host
|
||||||
|
restart: always
|
||||||
|
user: root
|
||||||
|
env_file:
|
||||||
|
- .env
|
||||||
|
environment:
|
||||||
|
- OPENVIDU_PRO_ELASTICSEARCH_HOST=${OPENVIDU_PRO_ELASTICSEARCH_HOST:-http://127.0.0.1:9200}
|
||||||
|
volumes:
|
||||||
|
- ./beats/metricbeat.yml:/usr/share/metricbeat/metricbeat.yml:ro
|
||||||
|
command: >
|
||||||
|
/bin/bash -c "metricbeat -e -strict.perms=false
|
||||||
|
`if [ ! -z $ELASTICSEARCH_USERNAME ]; then echo '-E output.elasticsearch.username=$ELASTICSEARCH_USERNAME'; fi`
|
||||||
|
`if [ ! -z $ELASTICSEARCH_PASSWORD ]; then echo '-E output.elasticsearch.password=$ELASTICSEARCH_PASSWORD'; fi`"
|
||||||
|
logging:
|
||||||
|
options:
|
||||||
|
max-size: "${DOCKER_LOGS_MAX_SIZE:-100M}"
|
||||||
|
|
||||||
filebeat:
|
filebeat:
|
||||||
image: docker.elastic.co/beats/filebeat-oss:7.8.0
|
image: docker.elastic.co/beats/filebeat-oss:7.8.0
|
||||||
network_mode: host
|
network_mode: host
|
||||||
|
|
|
@ -61,6 +61,10 @@ new_ov_installation() {
|
||||||
--output "${BEATS_FOLDER}/filebeat.yml" || fatal_error "Error when downloading the file 'filebeat.yml'"
|
--output "${BEATS_FOLDER}/filebeat.yml" || fatal_error "Error when downloading the file 'filebeat.yml'"
|
||||||
printf '\n - filebeat.yml'
|
printf '\n - filebeat.yml'
|
||||||
|
|
||||||
|
curl --silent ${DOWNLOAD_URL}/openvidu-server/deployments/pro/docker-compose/openvidu-server-pro/beats/metricbeat.yml \
|
||||||
|
--output "${BEATS_FOLDER}/metricbeat.yml" || fatal_error "Error when downloading the file 'metricbeat.yml'"
|
||||||
|
printf '\n - metricbeat.yml'
|
||||||
|
|
||||||
curl --silent ${DOWNLOAD_URL}/openvidu-server/deployments/pro/docker-compose/openvidu-server-pro/.env \
|
curl --silent ${DOWNLOAD_URL}/openvidu-server/deployments/pro/docker-compose/openvidu-server-pro/.env \
|
||||||
--output "${OPENVIDU_FOLDER}/.env" || fatal_error "Error when downloading the file '.env'"
|
--output "${OPENVIDU_FOLDER}/.env" || fatal_error "Error when downloading the file '.env'"
|
||||||
printf '\n - .env'
|
printf '\n - .env'
|
||||||
|
@ -198,6 +202,10 @@ upgrade_ov() {
|
||||||
--output "${TMP_FOLDER}/filebeat.yml" || fatal_error "Error when downloading the file 'filebeat.yml'"
|
--output "${TMP_FOLDER}/filebeat.yml" || fatal_error "Error when downloading the file 'filebeat.yml'"
|
||||||
printf '\n - filebeat.yml'
|
printf '\n - filebeat.yml'
|
||||||
|
|
||||||
|
curl --silent ${DOWNLOAD_URL}/openvidu-server/deployments/pro/docker-compose/openvidu-server-pro/beats/metricbeat.yml \
|
||||||
|
--output "${TMP_FOLDER}/metricbeat.yml" || fatal_error "Error when downloading the file 'metricbeat.yml'"
|
||||||
|
printf '\n - metricbeat.yml'
|
||||||
|
|
||||||
curl --silent ${DOWNLOAD_URL}/openvidu-server/deployments/pro/docker-compose/openvidu-server-pro/.env \
|
curl --silent ${DOWNLOAD_URL}/openvidu-server/deployments/pro/docker-compose/openvidu-server-pro/.env \
|
||||||
--output "${TMP_FOLDER}/.env" || fatal_error "Error when downloading the file '.env'"
|
--output "${TMP_FOLDER}/.env" || fatal_error "Error when downloading the file '.env'"
|
||||||
printf '\n - .env'
|
printf '\n - .env'
|
||||||
|
@ -301,6 +309,9 @@ upgrade_ov() {
|
||||||
mv "${TMP_FOLDER}/filebeat.yml" "${OPENVIDU_PREVIOUS_FOLDER}/beats/filebeat.yml" || fatal_error "Error while updating 'filebeat.yml'"
|
mv "${TMP_FOLDER}/filebeat.yml" "${OPENVIDU_PREVIOUS_FOLDER}/beats/filebeat.yml" || fatal_error "Error while updating 'filebeat.yml'"
|
||||||
printf '\n - filebeat.yml'
|
printf '\n - filebeat.yml'
|
||||||
|
|
||||||
|
mv "${TMP_FOLDER}/metricbeat.yml" "${OPENVIDU_PREVIOUS_FOLDER}/beats/metricbeat.yml" || fatal_error "Error while updating 'metricbeat.yml'"
|
||||||
|
printf '\n - metricbeat.yml'
|
||||||
|
|
||||||
printf "\n => Deleting 'tmp' folder"
|
printf "\n => Deleting 'tmp' folder"
|
||||||
rm -rf "${TMP_FOLDER}" || fatal_error "Error deleting 'tmp' folder"
|
rm -rf "${TMP_FOLDER}" || fatal_error "Error deleting 'tmp' folder"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue