Added curl for docker grafana

This commit is contained in:
Joachim 2022-05-06 22:04:51 +00:00
parent 8409cbe751
commit d1b2fa6cd8
7 changed files with 76 additions and 12506 deletions

BIN
all-monitor.tar Normal file

Binary file not shown.

View File

@ -9,27 +9,49 @@ volumes:
grafana_ds: grafana_ds:
services: services:
influxdb: # influxdb:
# image: influxdb:alpine
# container_name: influxdb
# ports:
# - "8087:8086"
# networks:
# - public
# - private
# volumes:
# - ./data/influxdb:/var/lib/influxdb:rw
# environment:
# INFLUXDB_REPORTING_DISABLED: "true"
# INFLUXDB_DB: telegraf
# INFLUXDB_USER: telegraf
# INFLUXDB_USER_PASSWORD: nimda321
influxdb_cli:
# links:
# - influxdb
image: influxdb:alpine image: influxdb:alpine
container_name: influxdb container_name: influxdb2
ports: ports:
- "8086:8086" - "8086:8086"
networks: volumes:
- public - ./data/influxdb:/var/lib/influxdb:rw
- private environment:
volumes: - DOCKER_INFLUXDB_INIT_MODE=setup
- ./data/influxdb:/var/lib/influxdb - DOCKER_INFLUXDB_INIT_USERNAME=admin
environment: - DOCKER_INFLUXDB_INIT_PASSWORD=startadmin
INFLUXDB_REPORTING_DISABLED: "true" - DOCKER_INFLUXDB_INIT_ORG=myorg
INFLUXDB_DB: telegraf - DOCKER_INFLUXDB_INIT_BUCKET=start
INFLUXDB_USER: telegraf - DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=2il9Lpevo6ujoaLhxN5Euinz39UxfzeKaChv7O99B69NDxH2XNvu-zxow5vL-1StZ0Sxu7uw4UyIySEI95H1IQ==
INFLUXDB_USER_PASSWORD: nimda321 entrypoint: ["./entrypoint.sh"]
restart: on-failure:10
# depends_on:
# - influxdb
grafana: grafana:
image: grafana/grafana:5.1.3 # image: grafana/grafana:5.1.3
image: grafana/grafana:latest
container_name: grafana container_name: grafana
ports: ports:
- "3001:3000" - "3000:3000"
networks: networks:
- public - public
- private - private
@ -62,6 +84,10 @@ services:
environment: environment:
# real influx host # real influx host
INFLUXDB_URI: "http://localhost:8086" INFLUXDB_URI: "http://localhost:8086"
DOCKER_INFLUXDB_INIT_ORG: "myorg"
DOCKER_INFLUXDB_INIT_BUCKET: "start"
DOCKER_INFLUXDB_INIT_ADMIN_TOKEN: "2il9Lpevo6ujoaLhxN5Euinz39UxfzeKaChv7O99B69NDxH2XNvu-zxow5vL-1StZ0Sxu7uw4UyIySEI95H1IQ=="
prometheus: prometheus:
image: quay.io/prometheus/prometheus:v2.0.0 image: quay.io/prometheus/prometheus:v2.0.0

View File

@ -1,6 +1,8 @@
#!/bin/bash #!/bin/bash
#set -e #set -e
apk add curl
# ADD INFLUXDB DATASOURCE # ADD INFLUXDB DATASOURCE
curl -s -H "Content-Type: application/json" \ curl -s -H "Content-Type: application/json" \
-XPOST http://admin:nimda321@localhost:3000/api/datasources \ -XPOST http://admin:nimda321@localhost:3000/api/datasources \
@ -9,7 +11,7 @@ curl -s -H "Content-Type: application/json" \
"name": "influxdb", "name": "influxdb",
"type": "influxdb", "type": "influxdb",
"access": "proxy", "access": "proxy",
"url": "http://influxdb:8086", "url": "http://influxdb2:8086",
"database": "telegraf", "database": "telegraf",
"user":"telegraf", "user":"telegraf",
"password":"nimda321", "password":"nimda321",

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -42,29 +42,29 @@ omit_hostname = false
############################################################################### ###############################################################################
# Configuration for influxdb server to send metrics to # Configuration for influxdb server to send metrics to
[[outputs.influxdb]] # [[outputs.influxdb]]
## The full HTTP or UDP endpoint URL for your InfluxDB instance. ## The full HTTP or UDP endpoint URL for your InfluxDB instance.
## Multiple urls can be specified as part of the same cluster, ## Multiple urls can be specified as part of the same cluster,
## this means that only ONE of the urls will be written to each interval. ## this means that only ONE of the urls will be written to each interval.
# urls = ["udp://localhost:8089"] # UDP endpoint example # urls = ["udp://localhost:8089"] # UDP endpoint example
urls = ["$INFLUXDB_URI"] # required # urls = ["$INFLUXDB_URI"] # required
## The target database for metrics (telegraf will create it if not exists). ## The target database for metrics (telegraf will create it if not exists).
database = "telegraf" # required # database = "telegraf" # required
## Retention policy to write to. Empty string writes to the default rp. ## Retention policy to write to. Empty string writes to the default rp.
retention_policy = "" # retention_policy = ""
## Write consistency (clusters only), can be: "any", "one", "quorum", "all" ## Write consistency (clusters only), can be: "any", "one", "quorum", "all"
write_consistency = "any" # write_consistency = "any"
## Write timeout (for the InfluxDB client), formatted as a string. ## Write timeout (for the InfluxDB client), formatted as a string.
## If not provided, will default to 5s. 0s means no timeout (not recommended). ## If not provided, will default to 5s. 0s means no timeout (not recommended).
timeout = "5s" # timeout = "5s"
username = "telegraf" # username = "telegraf"
password = "nimda321" # password = "nimda321"
## Set the user agent for HTTP POSTs (can be useful for log differentiation) ## Set the user agent for HTTP POSTs (can be useful for log differentiation)
user_agent = "telegraf-agent" # user_agent = "telegraf-agent"
## Set UDP payload size, defaults to InfluxDB UDP Client default (512 bytes) ## Set UDP payload size, defaults to InfluxDB UDP Client default (512 bytes)
# udp_payload = 512 # udp_payload = 512
@ -75,6 +75,24 @@ user_agent = "telegraf-agent"
## Use SSL but skip chain & host verification ## Use SSL but skip chain & host verification
# insecure_skip_verify = false # insecure_skip_verify = false
# Configuration for sending metrics to InfluxDB 2.0
[[outputs.influxdb_v2]]
## The URLs of the InfluxDB cluster nodes.
##
## Multiple URLs can be specified for a single cluster, only ONE of the
## urls will be written to each interval.
## ex: urls = ["https://us-west-2-1.aws.cloud2.influxdata.com"]
urls = ["http://127.0.0.1:8086"]
## Token for authentication.
# token = "2il9Lpevo6ujoaLhxN5Euinz39UxfzeKaChv7O99B69NDxH2XNvu-zxow5vL-1StZ0Sxu7uw4UyIySEI95H1IQ=="
token = "$DOCKER_INFLUXDB_INIT_ADMIN_TOKEN"
## Organization is the name of the organization you wish to write to.
organization = "$DOCKER_INFLUXDB_INIT_ORG"
## Destination bucket to write into.
bucket = "$DOCKER_INFLUXDB_INIT_BUCKET"
############################################################################### ###############################################################################
# INPUT PLUGINS # # INPUT PLUGINS #
@ -148,3 +166,8 @@ ignore_fs = ["tmpfs", "devtmpfs"]
## Directories to search within for the conntrack files above. ## Directories to search within for the conntrack files above.
## Missing directrories will be ignored. ## Missing directrories will be ignored.
dirs = ["/proc/sys/net/ipv4/netfilter","/proc/sys/net/netfilter"] dirs = ["/proc/sys/net/ipv4/netfilter","/proc/sys/net/netfilter"]
[[inputs.x509_cert]]
## List certificate sources
sources = ["https://www.dataport.de:443", "https://mail.unixweb.de:443", "https://chat.socialnetwork24.com:443", "https://cloud.unixweb.net:443", "https://blog.unixweb.de:443", "https://video.openws.de:443"]