Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions dcompose-stack/radar-cp-hadoop-stack/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,26 @@ services:
# For backwards compatibility
TOPIC_LIST: "application_record_counts"

#---------------------------------------------------------------------------#
# NetData Host Monitoring #
#---------------------------------------------------------------------------#
netdata:
image: netdata/netdata
networks:
- api
hostname: netdata # set to fqdn of host
cap_add:
- SYS_PTRACE
security_opt:
- apparmor:unconfined
environment:
Comment thread
blootsvoets marked this conversation as resolved.
PGID: 999
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./etc/netdata/netdata.conf:/etc/netdata/netdata.conf:ro
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If only a few options are updated, You can also use command directive in docker-compose to supply the daemon opts listed here https://docs.netdata.cloud/daemon/#command-line-options to the container. In this case, it will be like -

...
command: -W set section option value -W set section2 option2 value
...

Coz i see most of the conf file is commented out anyways but the file is more than 40k lines


#---------------------------------------------------------------------------#
# Docker Monitoring #
#---------------------------------------------------------------------------#
Expand Down Expand Up @@ -660,6 +680,7 @@ services:
- dashboard
- managementportal-app
- kafka-manager
- netdata
ports:
- "80:80"
- "443:443"
Expand All @@ -671,6 +692,7 @@ services:
- "./etc/webserver/ip-access-control.conf:/etc/nginx/ip-access-control.conf:ro"
- "./etc/webserver/kafka-manager.htpasswd:/etc/nginx/kafka-manager.htpasswd:ro"
- "./etc/webserver/optional-services.conf:/etc/nginx/optional-services.conf"
- "./etc/webserver/netdata.htpasswd:/etc/nginx/netdata.htpasswd:ro"
# healthcheck hard to do, however, it is possible to monitor this externally
# with
# docker logs --since 2m radarcphadoopstack_webserver_1 | grep "connect() failed"
Expand Down
1 change: 1 addition & 0 deletions dcompose-stack/radar-cp-hadoop-stack/etc/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/hdfs-connector/sink-hdfs.properties
/webserver/nginx.conf
/webserver/kafka-manager.htpasswd
/webserver/netdata.htpasswd
/webserver/ip-access-control.conf
/webserver/optional-services.conf
/radar-backend/radar.yml
Expand Down
2 changes: 2 additions & 0 deletions dcompose-stack/radar-cp-hadoop-stack/etc/env.template
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,5 @@ FITBIT_API_CLIENT_ID=fitbit-client
FITBIT_API_CLIENT_SECRET=fitbit-secret
NGINX_PROXIES=
RADAR_SCHEMAS_VERSION=0.4.3
NETDATA_USERNAME=
NETDATA_PASSWORD=
40,823 changes: 40,823 additions & 0 deletions dcompose-stack/radar-cp-hadoop-stack/etc/netdata/netdata.conf

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,13 @@ http {
proxy_pass http://managementportal-app:8080/managementportal/api/meta-token/;
proxy_set_header Host $host;
}
location /netdata/ {
include ip-access-control.conf;
auth_basic "NetData Monitoring";
auth_basic_user_file netdata.htpasswd;

proxy_pass http://netdata:19999/;
Comment thread
blootsvoets marked this conversation as resolved.
}
location /kafkamanager/{
include ip-access-control.conf;
auth_basic "Kafka manager";
Expand Down
5 changes: 5 additions & 0 deletions dcompose-stack/radar-cp-hadoop-stack/lib/perform-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ ensure_env_default HOTSTORAGE_NAME hotstorage
ensure_env_password POSTGRES_PASSWORD "PostgreSQL password not set in .env."
ensure_env_default KAFKA_MANAGER_USERNAME kafkamanager-user
ensure_env_password KAFKA_MANAGER_PASSWORD "Kafka Manager password not set in .env."
ensure_env_default NETDATA_USERNAME netdata-user
ensure_env_password NETDATA_PASSWORD "NetData password not set in .env."

if [ -z ${PORTAINER_PASSWORD_HASH} ]; then
query_password PORTAINER_PASSWORD "Portainer password not set in .env."
Expand Down Expand Up @@ -150,6 +152,9 @@ inline_variable 'database_name:[[:space:]]' "$HOTSTORAGE_NAME" etc/rest-api/rada
echo "==> Configuring Kafka-manager"
sudo-linux docker run --rm httpd:2.4-alpine htpasswd -nbB "${KAFKA_MANAGER_USERNAME}" "${KAFKA_MANAGER_PASSWORD}" > etc/webserver/kafka-manager.htpasswd

echo "==> Configuring NetData"
sudo-linux docker run --rm httpd:2.4-alpine htpasswd -nbB "${NETDATA_USERNAME}" "${NETDATA_PASSWORD}" > etc/webserver/netdata.htpasswd
Comment thread
blootsvoets marked this conversation as resolved.

echo "==> Configuring nginx"
inline_variable 'server_name[[:space:]]*' "${SERVER_NAME};" etc/webserver/nginx.conf
if [ "${ENABLE_HTTPS:-yes}" = yes ]; then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,5 @@ ENABLE_OPTIONAL_SERVICES=true
FITBIT_API_CLIENT_ID=fitbit-client
FITBIT_API_CLIENT_SECRET=fitbit-secret
RADAR_SCHEMAS_VERSION=0.4.2
NETDATA_USERNAME=admin
NETDATA_PASSWORD=netdata-radar