├── src ├── telegraf-pve-node │ ├── etc │ │ ├── udev │ │ │ └── rules.d │ │ │ │ └── 52-telegraf-ipmi.rules │ │ ├── rsyslog.d │ │ │ └── telegraf.conf │ │ └── default │ │ │ └── hddtemp │ ├── install.sh │ └── README.md ├── docker │ ├── grafana │ │ ├── web │ │ │ ├── images │ │ │ │ ├── fav32.png │ │ │ │ ├── apple-touch-icon.png │ │ │ │ └── grafana_mask_icon.svg │ │ │ └── views │ │ │ │ └── index.html │ │ ├── emails │ │ │ ├── reset_password.html │ │ │ ├── welcome_on_signup.html │ │ │ ├── signup_started.html │ │ │ ├── invited_to_org.html │ │ │ ├── new_user_invite.html │ │ │ └── alert_notification_example.html │ │ └── config │ │ │ └── grafana.ini │ ├── .env │ ├── metrics-utils.bat │ ├── metrics-utils │ ├── influxdb │ │ └── config │ │ │ └── influxdb.conf │ ├── telegraf │ │ └── telegraf.conf │ ├── README.md │ ├── kapacitor │ │ └── config │ │ │ └── kapacitor.conf │ └── docker-compose.yml └── scripts-hook │ ├── images │ ├── vzdump-dashboard.png │ └── cv4pve-autosnap-dashboard.png │ ├── cv4pve-metrics-autosnap.sh │ ├── cv4pve-metrics-autosnap.ps1 │ ├── cv4pve-metrics-vzdump.sh │ └── README.md ├── 3rd-party-licenses.md ├── LICENSE.md ├── .vscode ├── launch.json └── tasks.json └── README.md /src/telegraf-pve-node/etc/udev/rules.d/52-telegraf-ipmi.rules: -------------------------------------------------------------------------------- 1 | KERNEL=="ipmi*", MODE="660", GROUP="telegraf" -------------------------------------------------------------------------------- /src/docker/grafana/web/images/fav32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Corsinvest/cv4pve-metrics/HEAD/src/docker/grafana/web/images/fav32.png -------------------------------------------------------------------------------- /src/scripts-hook/images/vzdump-dashboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Corsinvest/cv4pve-metrics/HEAD/src/scripts-hook/images/vzdump-dashboard.png -------------------------------------------------------------------------------- /src/docker/grafana/web/images/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Corsinvest/cv4pve-metrics/HEAD/src/docker/grafana/web/images/apple-touch-icon.png -------------------------------------------------------------------------------- /src/scripts-hook/images/cv4pve-autosnap-dashboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Corsinvest/cv4pve-metrics/HEAD/src/scripts-hook/images/cv4pve-autosnap-dashboard.png -------------------------------------------------------------------------------- /src/docker/grafana/web/images/grafana_mask_icon.svg: -------------------------------------------------------------------------------- 1 | logo-corsinvest-776x776C -------------------------------------------------------------------------------- /src/docker/.env: -------------------------------------------------------------------------------- 1 | # This file is part of the cv4pve-metrics https://github.com/Corsinvest/cv4pve-metrics, 2 | # 3 | # This source file is available under two different licenses: 4 | # - GNU General Public License version 3 (GPLv3) 5 | # - Corsinvest Enterprise License (CEL) 6 | # Full copyright and license information is available in 7 | # LICENSE.md which is distributed with this source code. 8 | # 9 | # Copyright (C) 2016 Corsinvest Srl GPLv3 and CEL 10 | 11 | DATA_STORE=d:/docker_data/fagiano -------------------------------------------------------------------------------- /src/telegraf-pve-node/etc/rsyslog.d/telegraf.conf: -------------------------------------------------------------------------------- 1 | #$WorkDirectory /tmp/rsyslog # temporary directory for storing data 2 | #$ActionQueueType LinkedList # use asynchronous processing 3 | #$ActionQueueFileName srvrfwd # set file name, also enables disk mode 4 | #$ActionResumeRetryCount -1 # infinite retries on insert failure 5 | #$ActionQueueSaveOnShutdown on # save in-memory data if rsyslog shuts down 6 | #$ModLoad imudp #loads the udp module 7 | #listen for messages on udp localhost:514 $UDPServerAddress localhost $UDPServerRun 514 *.* 8 | *.* @(o)127.0.0.1:6514;RSYSLOG_SyslogProtocol23Format 9 | -------------------------------------------------------------------------------- /3rd-party-licenses.md: -------------------------------------------------------------------------------- 1 | # License overview of included 3rd party libraries 2 | 3 | The project is licensed under the terms of the [LICENSE.md](LICENSE.md) 4 | 5 | However, includes several third-party Open-Source libraries, which are licensed under their own respective Open-Source licenses. 6 | 7 | ## Libraries directly included 8 | 9 | [Corsinvest ProxmoxVE Api](https://github.com/Corsinvest/cv4pve-api-dotnet) 10 | License: GPLv3 11 | 12 | [Corsinvest ProxmoxVE Api Extension](https://github.com/Corsinvest/cv4pve-api-dotnet) 13 | License: GPLv3 14 | 15 | [Dotnet Core](https://github.com/dotnet/core) 16 | License: MIT 17 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | # License 2 | 3 | Copyright (C) Corsinvest Srl 4 | 5 | This software is available under two different licenses: 6 | 7 | * GNU General Public License version 3 (GPLv3) 8 | * Corsinvest Enterprise License (CEL) 9 | 10 | The default license, without a valid Corsinvest Enterprise License (CEL) agreement, is the Open-Source GPLv3 license. 11 | 12 | ## GNU General Public License version 3 (GPLv3) 13 | 14 | If you decide to choose the GPLv3 license, you must comply with the following terms: 15 | [GPLv3](gpl-3.0.txt) 16 | 17 | ## Corsinvest Enterprise License (CEL) 18 | 19 | Alternatively, commercial and supported versions of the program - also known as Enterprise Distributions - must be used in accordance with the terms and conditions contained in a separate written agreement between you and Corsinvest Srl. For more information about the Corsinvest Enterprise License (CEL) please visit [site](https://www.corsinvest.it/open-source#license) 20 | 21 | Please see also (files in this directory): 22 | 23 | [GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 - gpl-3.0.txt](gpl-3.0.txt) 24 | 25 | [Libraries used including their own licenses - 3rd-party-licenses.md](3rd-party-licenses.md) 26 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to find out which attributes exist for C# debugging 3 | // Use hover for the description of the existing attributes 4 | // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "name": ".NET Core Launch (console)", 9 | "type": "coreclr", 10 | "request": "launch", 11 | "preLaunchTask": "build", 12 | // If you have changed target frameworks, make sure to update the program path. 13 | "program": "${workspaceFolder}/old/src/Corsinvest.Proxmox.Metrics/bin/Debug/netcoreapp3.0/cv4pve-metrics.dll", 14 | "args": [], 15 | "cwd": "${workspaceFolder}/old/src/Corsinvest.Proxmox.Metrics", 16 | // For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console 17 | "console": "internalConsole", 18 | "stopAtEntry": false 19 | }, 20 | { 21 | "name": ".NET Core Attach", 22 | "type": "coreclr", 23 | "request": "attach", 24 | "processId": "${command:pickProcess}" 25 | } 26 | ] 27 | } -------------------------------------------------------------------------------- /src/telegraf-pve-node/etc/default/hddtemp: -------------------------------------------------------------------------------- 1 | # Defaults for hddtemp initscript (/etc/init.d/hddtemp) 2 | # This is a POSIX shell fragment 3 | 4 | # [automatically edited by postinst, do not change line format ] 5 | 6 | # hddtemp network daemon switch. If set to true, hddtemp will listen 7 | # for incoming connections. 8 | RUN_DAEMON="true" 9 | 10 | # List of devices you want to use with hddtemp. If none specified, 11 | # hddtemp will probe standard devices. 12 | #DISKS="/dev/hda" 13 | 14 | # List of devices you want to use with hddtemp, but that would not be 15 | # probed for a working sensor. 16 | DISKS_NOPROBE="" 17 | 18 | # IP address of the interface on which you want hddtemp to be bound 19 | # on. If none specified, goes to 127.0.0.1. Use 0.0.0.0 to bind hddtemp 20 | # on all interfaces. 21 | INTERFACE="0.0.0.0" 22 | 23 | # Port number on which you want hddtemp to listen on. If none specified, 24 | # the port 7634 is used. 25 | PORT="7634" 26 | 27 | # Database file to use. If none specified, /etc/hddtemp.db is used. 28 | #DATABASE="/etc/hddtemp.db" 29 | 30 | # Separator to use between fields. The default separator is '|'. 31 | #SEPARATOR="|" 32 | 33 | # Logging period (in seconds) for the temperatures. If set to a value 34 | # different than 0, hddtemp will run as a daemon periodically logging 35 | # the temperatures through syslog 36 | RUN_SYSLOG="0" 37 | 38 | # Other options to pass to hddtemp 39 | OPTIONS="" 40 | -------------------------------------------------------------------------------- /src/scripts-hook/cv4pve-metrics-autosnap.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # This file is part of the cv4pve-metrics https://github.com/Corsinvest/cv4pve-metrics, 4 | # 5 | # This source file is available under two different licenses: 6 | # - GNU General Public License version 3 (GPLv3) 7 | # - Corsinvest Enterprise License (CEL) 8 | # Full copyright and license information is available in 9 | # LICENSE.md which is distributed with this source code. 10 | # 11 | # Copyright (C) 2016 Corsinvest Srl GPLv3 and CEL 12 | # 13 | # Save metrics for autosnap on database InfluxDB 14 | 15 | INFLUXDB_HOST="" 16 | INFLUXDB_PORT="8086" 17 | INFLUXDB_NAME="db_proxmox" 18 | INFLUXDB_USER="" 19 | INFLUXDB_PASSWORD="" 20 | 21 | if [[ $CV4PVE_AUTOSNAP_PHASE == "snap-create-abort" ]] || [[ $CV4PVE_AUTOSNAP_PHASE == "snap-create-post" ]]; then 22 | #url post 23 | url="http://$INFLUXDB_HOST:$INFLUXDB_PORT/write?db=$INFLUXDB_NAME" 24 | 25 | #data metrics 26 | data="cv4pve-autosnap,vmid=$CV4PVE_AUTOSNAP_VMID,type=$CV4PVE_AUTOSNAP_VMTYPE,label=$CV4PVE_AUTOSNAP_LABEL,vmname=$CV4PVE_AUTOSNAP_VMNAME,success=$CV4PVE_AUTOSNAP_STATE success=$CV4PVE_AUTOSNAP_STATE,duration=$CV4PVE_AUTOSNAP_DURATION" 27 | 28 | if [[ $INFLUXDB_USER == "" ]]; then 29 | #no login 30 | curl -s -i -XPOST "$url" --data-binary "$data" 31 | else 32 | #with login 33 | curl -s -i -XPOST -u $INFLUXDB_USER:$INFLUXDB_PASSWORD "$url" --data-binary "$data" 34 | fi 35 | fi 36 | -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0.0", 3 | "tasks": [ 4 | { 5 | "label": "build", 6 | "command": "dotnet", 7 | "type": "process", 8 | "args": [ 9 | "build", 10 | "${workspaceFolder}/old/src/Corsinvest.Proxmox.Metrics/Corsinvest.Proxmox.Metrics.csproj", 11 | "/property:GenerateFullPaths=true", 12 | "/consoleloggerparameters:NoSummary" 13 | ], 14 | "problemMatcher": "$msCompile" 15 | }, 16 | { 17 | "label": "publish", 18 | "command": "dotnet", 19 | "type": "process", 20 | "args": [ 21 | "publish", 22 | "${workspaceFolder}/old/src/Corsinvest.Proxmox.Metrics/Corsinvest.Proxmox.Metrics.csproj", 23 | "/property:GenerateFullPaths=true", 24 | "/consoleloggerparameters:NoSummary" 25 | ], 26 | "problemMatcher": "$msCompile" 27 | }, 28 | { 29 | "label": "watch", 30 | "command": "dotnet", 31 | "type": "process", 32 | "args": [ 33 | "watch", 34 | "run", 35 | "${workspaceFolder}/old/src/Corsinvest.Proxmox.Metrics/Corsinvest.Proxmox.Metrics.csproj", 36 | "/property:GenerateFullPaths=true", 37 | "/consoleloggerparameters:NoSummary" 38 | ], 39 | "problemMatcher": "$msCompile" 40 | } 41 | ] 42 | } -------------------------------------------------------------------------------- /src/scripts-hook/cv4pve-metrics-autosnap.ps1: -------------------------------------------------------------------------------- 1 | # This file is part of the cv4pve-metrics https://github.com/Corsinvest/cv4pve-metrics, 2 | # 3 | # This source file is available under two different licenses: 4 | # - GNU General Public License version 3 (GPLv3) 5 | # - Corsinvest Enterprise License (CEL) 6 | # Full copyright and license information is available in 7 | # LICENSE.md which is distributed with this source code. 8 | # 9 | # Copyright (C) 2016 Corsinvest Srl GPLv3 and CEL 10 | # 11 | # Save metrics for autosnap on database InfluxDB 12 | 13 | $INFLUXDB_HOST="" 14 | $INFLUXDB_PORT="8086" 15 | $INFLUXDB_NAME="db_proxmox" 16 | $INFLUXDB_USER="" 17 | $INFLUXDB_PASSWORD="" 18 | 19 | if ( $Env:CV4PVE_AUTOSNAP_PHASE -eq "snap-create-abort" -or $Env:CV4PVE_AUTOSNAP_PHASE -eq "snap-create-post" ) { 20 | #url post 21 | $url="http://$($INFLUXDB_HOST):$INFLUXDB_PORT/write?db=$INFLUXDB_NAME" 22 | 23 | #data metrics 24 | $data="cv4pve-autosnap,vmid=$Env:CV4PVE_AUTOSNAP_VMID,type=$Env:CV4PVE_AUTOSNAP_VMTYPE,label=$Env:CV4PVE_AUTOSNAP_LABEL,vmname=$CV4PVE_AUTOSNAP_VMNAME,success=$Env:CV4PVE_AUTOSNAP_STATE success=$Env:CV4PVE_AUTOSNAP_STATE,duration=$Env:CV4PVE_AUTOSNAP_DURATION" 25 | 26 | if ( $INFLUXDB_USER -eq "" ) { 27 | #no login 28 | Invoke-WebRequest -Method Post -Body $data -Uri $url | Out-Null 29 | } 30 | else { 31 | #with login 32 | $base64AuthInfo = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(("{0}:{1}" -f $INFLUXDB_USER,$INFLUXDB_PASSWORD))) 33 | Invoke-RestMethod -Headers @{Authorization=("Basic {0}" -f $base64AuthInfo)} -Method Post -Body $data -Uri $url | Out-Null 34 | } 35 | } -------------------------------------------------------------------------------- /src/telegraf-pve-node/install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # This file is part of the cv4pve-metrics https://github.com/Corsinvest/cv4pve-metrics, 4 | # 5 | # This source file is available under two different licenses: 6 | # - GNU General Public License version 3 (GPLv3) 7 | # - Corsinvest Enterprise License (CEL) 8 | # Full copyright and license information is available in 9 | # LICENSE.md which is distributed with this source code. 10 | # 11 | # Copyright (C) 2016 Corsinvest Srl GPLv3 and CEL 12 | # 13 | # Save metrics for autosnap on database InfluxDB 14 | 15 | # install telegraf 16 | wget https://dl.influxdata.com/telegraf/releases/telegraf_1.15.2-1_amd64.deb 17 | dpkg -i telegraf_1.15.2-1_amd64.deb 18 | rm telegraf_1.15.2-1_amd64.deb 19 | 20 | wget -O /etc/telegraf/telegraf.conf https://raw.githubusercontent.com/Corsinvest/cv4pve-metrics/master/src/telegraf-pve-node/etc/telegraf/telegraf.conf 21 | 22 | # Install and configure IPMI tools 23 | apt-get --assume-yes install ipmitool 24 | wget -O /etc/udev/rules.d/52-telegraf-ipmi.rules https://raw.githubusercontent.com/Corsinvest/cv4pve-metrics/master/src/telegraf-pve-node/etc/udev/rules.d/52-telegraf-ipmi.rules 25 | 26 | # Reboot is required for apply change. If you want apply immediately change use this command: 27 | chown :telegraf /dev/ipmi* 28 | chmod g+rw /dev/ipmi* 29 | 30 | # hddtemp 31 | apt-get --assume-yes install hddtemp 32 | wget -O /etc/default/hddtemp https://raw.githubusercontent.com/Corsinvest/cv4pve-metrics/master/src/telegraf-pve-node/etc/default/hddtemp 33 | 34 | service hddtemp restart 35 | 36 | # lm-sensors 37 | apt-get --assume-yes install lm-sensors 38 | 39 | # Syslog integration 40 | wget -O /etc/rsyslog.d/telegraf.conf https://raw.githubusercontent.com/Corsinvest/cv4pve-metrics/master/src/telegraf-pve-node/etc/rsyslog.d/telegraf.conf 41 | 42 | service rsyslog restart 43 | 44 | # Restart service telegraf 45 | service telegraf restart 46 | -------------------------------------------------------------------------------- /src/scripts-hook/cv4pve-metrics-vzdump.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # This file is part of the cv4pve-metrics https://github.com/Corsinvest/cv4pve-metrics, 4 | # 5 | # This source file is available under two different licenses: 6 | # - GNU General Public License version 3 (GPLv3) 7 | # - Corsinvest Enterprise License (CEL) 8 | # Full copyright and license information is available in 9 | # LICENSE.md which is distributed with this source code. 10 | # 11 | # Copyright (C) 2016 Corsinvest Srl GPLv3 and CEL 12 | # 13 | # Save metrics for vzdump on database InfluxDB 14 | # 15 | # edit /etc/vzdump.conf and change tag "script:" with this script 16 | # 17 | # see https://pve.proxmox.com/pve-docs/vzdump.1.html 18 | 19 | INFLUXDB_HOST="" 20 | INFLUXDB_PORT="8086" 21 | INFLUXDB_NAME="db_proxmox" 22 | INFLUXDB_USER="" 23 | INFLUXDB_PASSWORD="" 24 | 25 | phase="$1" 26 | mode="$2" 27 | vmid="$3" 28 | 29 | if [ "$phase" == "log-end" ]; then 30 | success=0 31 | duration=0 32 | size=0 33 | speed=0 34 | 35 | if [ `cat ${LOGFILE} | grep ERROR | wc -l` -eq 0 ]; then 36 | size=`stat -c%s $TARFILE` 37 | success=1 38 | speed=$((cat ${LOGFILE} | grep -o -P "(?<=seconds \().*(?= MiB/s)"| awk '{printf("%d\n",$1 + 0.5)}')) 39 | if [ ! "$speed" -gt 0 ]; then 40 | speed=$(cat ${LOGFILE} | grep -o -P "(?<=.iB, ).*(?=.iB\/s)") 41 | fi 42 | duration=$((`cat ${LOGFILE} |grep -o -P "(?<=\()[0-9][0-9]:[0-9][0-9]:[0-9][0-9](?=\))"|awk -F':' '{print($1*3600)+($2*60)+$3}'`)) 43 | fi 44 | 45 | #url post 46 | url="http://$INFLUXDB_HOST:$INFLUXDB_PORT/write?db=$INFLUXDB_NAME" 47 | 48 | #data metrics 49 | data="vzdump,host=$HOSTNAME,type=$VMTYPE,storeid=$STOREID,vmid=$vmid vmid=$vmid,success=$success,duration=$duration,speed=$speed,size=$size" 50 | 51 | if [[ $INFLUXDB_USER == "" ]]; then 52 | #no login 53 | curl -s -i -XPOST "$url" --data-binary "$data" 54 | else 55 | #with login 56 | curl -s -i -XPOST -u $INFLUXDB_USER:$INFLUXDB_PASSWORD "$url" --data-binary "$data" 57 | fi 58 | fi -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # cv4pve-metrics 2 | 3 | [![License](https://img.shields.io/github/license/Corsinvest/cv4pve-metrics.svg)](LICENSE.md) 4 | 5 | This solutions consists of more parts (subdirectory src): 6 | 7 | * **docker** Docker compose with InfluxDb, Telegraf, Kapacitor, Cronograf, Grafana 8 | * **scripts-hook** Hook Script for send metrics to InfluxDB use protocol http (vzdump, cv4pve-autosnap) 9 | * **telegraf-pve-node** Documentation for setting telegraf inside node Proxmox VE 10 | 11 | Dashboards for Grafana: 12 | 13 | * [Proxmox VE Home](https://grafana.com/grafana/dashboards/11416) 14 | * [Proxmox VE Alert](https://grafana.com/grafana/dashboards/11418) 15 | * [Proxmox VE cv4pve-autosnap](https://grafana.com/grafana/dashboards/13099) 16 | * [Proxmox VE Backup VZDump](https://grafana.com/grafana/dashboards/12907) 17 | * [Proxmox VE KVM](https://grafana.com/grafana/dashboards/12908) 18 | * [Proxmox VE Network](https://grafana.com/grafana/dashboards/12909) 19 | * [Proxmox VE Node](https://grafana.com/grafana/dashboards/12910) 20 | * [Proxmox VE Node Detailed](https://grafana.com/grafana/dashboards/12911) 21 | * [Proxmox VE Node IPMI](https://grafana.com/grafana/dashboards/12912) 22 | * [Proxmox VE Sensors](https://grafana.com/grafana/dashboards/12913) 23 | * [Proxmox VE Storage](https://grafana.com/grafana/dashboards/12914) 24 | * [Proxmox VE Syslog](https://grafana.com/grafana/dashboards/12915) 25 | 26 | For more dashboards or metrics in cloud visit https://www.cv4pve-tools.com and see plans support. 27 | 28 | ```text 29 | ______ _ __ 30 | / ____/___ __________(_)___ _ _____ _____/ /_ 31 | / / / __ \/ ___/ ___/ / __ \ | / / _ \/ ___/ __/ 32 | / /___/ /_/ / / (__ ) / / / / |/ / __(__ ) /_ 33 | \____/\____/_/ /____/_/_/ /_/|___/\___/____/\__/ 34 | 35 | Metrics for Proxmox VE (Made in Italy) 36 | ``` 37 | 38 | ## Copyright and License 39 | 40 | Copyright: Corsinvest Srl 41 | For licensing details please visit [LICENSE.md](LICENSE.md) 42 | 43 | ## Commercial Support 44 | 45 | This software is part of a suite of tools called cv4pve-tools. If you want commercial support, visit the [site](https://www.cv4pve-tools.com) 46 | -------------------------------------------------------------------------------- /src/scripts-hook/README.md: -------------------------------------------------------------------------------- 1 | # cv4pve-metrics 2 | 3 | [![license](https://img.shields.io/github/license/corsinvest/cv4pve-metrics.svg)](https://github.com/Corsinvest/cv4pve-metrics/blob/master/LICENSE.md) 4 | 5 | ## Copyright and License 6 | 7 | Copyright: Corsinvest Srl 8 | For licensing details please visit [LICENSE.md](https://github.com/Corsinvest/cv4pve-metrics/blob/master/LICENSE.md) 9 | 10 | ## Commercial Support 11 | 12 | This software is part of a suite of tools called cv4pve-tools. If you want commercial support, visit the [site](https://www.cv4pve-tools.com) 13 | 14 | ## Introduction 15 | 16 | Script for saving metrics into InfluxDB 17 | 18 | ## cv4pve-metrics-vzdump 19 | 20 | Copy script cv4pve-metrics-vzdump.sh and edit variable in file. 21 | 22 | ```sh 23 | INFLUXDB_HOST="" 24 | INFLUXDB_PORT="8086" 25 | INFLUXDB_NAME="db_proxmox" 26 | INFLUXDB_USER="" 27 | INFLUXDB_PASSWORD="" 28 | ``` 29 | 30 | Empty **INFLUXDB_USER** no authentication required. 31 | 32 | Edit file "/etc/vzdump.conf" and change tag "script:" with path script. 33 | e.g 34 | 35 | ```sh 36 | script: /cv4pve-metrics-vzdump.sh 37 | ``` 38 | 39 | ![Dashboard](./images/vzdump-dashboard.png) 40 | 41 | ## cv4pve-metrics-autosnap 42 | 43 | Copy script cv4pve-metrics-autosnap **sh** or **ps1** in directory to execute. 44 | Edit cv4pve-metrics-autosnap set variable. 45 | 46 | ```sh 47 | INFLUXDB_HOST="" 48 | INFLUXDB_PORT="8086" 49 | INFLUXDB_NAME="db_proxmox" 50 | INFLUXDB_USER="" 51 | INFLUXDB_PASSWORD="" 52 | ``` 53 | 54 | Empty **INFLUXDB_USER** no authentication required. 55 | 56 | Execution in linux shell 57 | 58 | ```sh 59 | root@debian:~# cv4pve-autosnap --host=192.168.0.100 --username=root@pam --password=fagiano --vmid=111 snap --label='daily' --keep=2 --script cv4pve-metrics-autosnap.sh 60 | ``` 61 | 62 | Execution in windows 63 | 64 | Create script batch add line 65 | 66 | ```bat 67 | PowerShell \cv4pve-metrics-autosnap.ps1 68 | ``` 69 | 70 | Execute autosnap 71 | 72 | ```cmd 73 | C:\Users\Frank>cv4pve-autosnap.exe --host=192.168.0.100 --username=root@pam --password=fagiano --vmid=111 snap --label='daily' --keep=2 --script script.bat 74 | ``` 75 | 76 | ![Dashboard](./images/cv4pve-autosnap-dashboard.png) 77 | -------------------------------------------------------------------------------- /src/docker/metrics-utils.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | REM This file is part of the cv4pve-metrics https://github.com/Corsinvest/cv4pve-metrics, 3 | REM 4 | REM This source file is available under two different licenses: 5 | REM - GNU General Public License version 3 (GPLv3) 6 | REM - Corsinvest Enterprise License (CEL) 7 | REM Full copyright and license information is available in 8 | REM LICENSE.md which is distributed with this source code. 9 | REM 10 | REM Copyright (C) 2016 Corsinvest Srl GPLv3 and CEL 11 | REM 12 | TITLE Metrics Util 13 | 14 | SET interactive=1 15 | SET COMPOSE_CONVERT_WINDOWS_PATHS=1 16 | 17 | ECHO %cmdcmdline% | FIND /i "/c" 18 | IF %ERRORLEVEL% == 0 SET interactive=0 19 | 20 | IF "%1"=="enter" ( 21 | REM Enter attaches users to a shell in the desired container 22 | IF "%2"=="" ( 23 | ECHO metrics-utils enter ^(influxdb^|^|chronograf^|^|kapacitor^|^|telegraf^|^|grafana^) 24 | ) ELSE ( 25 | ECHO Entering ^/bin^/bash session in the %2 container... 26 | docker-compose exec %2 /bin/bash 27 | ) 28 | ) ELSE IF "%1"=="logs" ( 29 | REM Logs streams the logs from the container to the shell 30 | IF "%2"=="" ( 31 | ECHO metrics-utils logs ^(influxdb^|^|chronograf^|^|kapacitor^|^|telegraf^|^|grafana^) 32 | ) ELSE ( 33 | ECHO Following the logs from the %2 container... 34 | docker-compose logs -f %2 35 | ) 36 | ) ELSE IF "%1"=="up" ( 37 | docker-compose up -d --build 38 | ) ELSE IF "%1"=="down" ( 39 | ECHO Stopping running metrics containers... 40 | docker-compose down 41 | ) ELSE IF "%1"=="restart" ( 42 | ECHO Stopping all metrics processes... 43 | docker-compose down >NUL 2>NUL 44 | ECHO Starting all matrics processes... 45 | docker-compose up -d >NUL 2>NUL 46 | ECHO Services available! 47 | ) ELSE IF "%1"=="influxdb" ( 48 | ECHO Entering the influx cli... 49 | docker-compose exec influxdb /usr/bin/influx 50 | ) ELSE ( 51 | ECHO metrics-util commands: 52 | ECHO up -^> spin up the sandbox environment 53 | ECHO down -^> tear down the sandbox environment 54 | ECHO restart -^> restart the sandbox 55 | ECHO influxdb -^> attach to the influx cli 56 | ECHO. 57 | ECHO enter ^(influxdb^|^|kapacitor^|^|chronograf^|^|telegraf^|^|grafana^) -^> enter the specified container 58 | ECHO logs ^(influxdb^|^|kapacitor^|^|chronograf^|^|telegraf^|^|grafana^) -^> stream logs for the specified container 59 | ) 60 | 61 | IF "%interactive%"=="0" rem PAUSE 62 | EXIT /B 0 63 | -------------------------------------------------------------------------------- /src/telegraf-pve-node/README.md: -------------------------------------------------------------------------------- 1 | # cv4pve-metrics 2 | 3 | [![license](https://img.shields.io/github/license/corsinvest/cv4pve-metrics.svg)](https://github.com/Corsinvest/cv4pve-metrics/blob/master/LICENSE.md) 4 | 5 | ## Copyright and License 6 | 7 | Copyright: Corsinvest Srl 8 | For licensing details please visit [LICENSE.md](https://github.com/Corsinvest/cv4pve-metrics/blob/master/LICENSE.md) 9 | 10 | ## Commercial Support 11 | 12 | This software is part of a suite of tools called cv4pve-tools. If you want commercial support, visit the [site](https://www.cv4pve-tools.com) 13 | 14 | ## Introduction 15 | 16 | These instructions are for configuring telegraf inside a Proxmox VE node. 17 | Copy file configuration in specific folder. 18 | 19 | Connect to node Proxmox VE 20 | 21 | ### Fast install 22 | 23 | Download [install.sh](./install.sh) and execute on node. Change InfluxDb host. 24 | 25 | ### Telegraf 26 | 27 | Download and install [telegraf](https://portal.influxdata.com/downloads/) 28 | 29 | The default configuration file is located in /etc/telegraf/telegraf.conf. Replace with this [file](./etc/telegraf/telegraf.conf). 30 | 31 | Change sections: 32 | 33 | ```ini 34 | [[outputs.influxdb]] 35 | urls = ["http://:8086"] #IP/Hostname InfluxDB server 36 | database = "db_telegraf_proxmox" #not necessary 37 | ``` 38 | 39 | If you want enable other section for Proxmox VE Cluster see example section with [[inputs.ping]] using tags 40 | 41 | ### Install and configure IPMI tools 42 | 43 | Install 44 | 45 | ```sh 46 | apt-get install ipmitool 47 | ``` 48 | 49 | Change permission **telegraf** user to read **IPMI** information 50 | Create file /etc/udev/rules.d/52-telegraf-ipmi.rules with content: 51 | 52 | ```txt 53 | KERNEL=="ipmi*", MODE="660", GROUP="telegraf" 54 | ``` 55 | 56 | or copy this [file](./etc/udev/rules.d/52-telegraf-ipmi.rules) in /etc/udev/rules.d/52-telegraf-ipmi.rules 57 | 58 | Reboot is required for apply change. If you want apply immediately change use this command: 59 | 60 | ```sh 61 | chown :telegraf /dev/ipmi* 62 | chmod g+rw /dev/ipmi* 63 | ``` 64 | 65 | ### hddtemp 66 | 67 | Install 68 | 69 | ```sh 70 | apt-get install hddtemp 71 | ``` 72 | 73 | Enabled daemon in /etc/default/hddtemp or copy this [file](./etc/default/hddtemp) in /etc/default/hddtemp 74 | 75 | Restart service 76 | 77 | ```sh 78 | service hddtemp restart 79 | ``` 80 | 81 | ### lm-sensors 82 | 83 | Install 84 | 85 | ```sh 86 | apt-get install lm-sensors 87 | ``` 88 | 89 | ### Syslog integration 90 | 91 | Integration with syslog use listener in telegraf. 92 | Copy [file](./etc/rsyslog.d/telegraf.conf) in host /etc/rsyslog.d/telegraf.conf. 93 | 94 | Restart service rsyslog 95 | 96 | ```sh 97 | service rsyslog restart 98 | ``` 99 | 100 | ### End configuration 101 | 102 | Restart telegraf service 103 | 104 | ```sh 105 | service telegraf restart 106 | ``` 107 | -------------------------------------------------------------------------------- /src/docker/metrics-utils: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # This file is part of the cv4pve-metrics https://github.com/Corsinvest/cv4pve-metrics, 4 | # 5 | # This source file is available under two different licenses: 6 | # - GNU General Public License version 3 (GPLv3) 7 | # - Corsinvest Enterprise License (CEL) 8 | # Full copyright and license information is available in 9 | # LICENSE.md which is distributed with this source code. 10 | # 11 | # Copyright (C) 2016 Corsinvest Srl GPLv3 and CEL 12 | # 13 | # Utils 14 | 15 | set -eo pipefail 16 | IFS=$'\n\t' 17 | 18 | if ! [ -x "$(command -v docker)" ]; then 19 | echo 'Error: docker is not installed.' >&2 20 | exit 1 21 | fi 22 | 23 | if ! [ -x "$(command -v docker-compose)" ]; then 24 | echo 'Error: docker-compose is not installed.' >&2 25 | exit 1 26 | fi 27 | 28 | main () { 29 | # Enter attaches users to a shell in the desired container 30 | enter () { 31 | case $2 in 32 | influxdb|chronograf|kapacitor|telegraf|grafana) 33 | echo "Entering /bin/bash session in the $2 container..." 34 | docker-compose exec $2 /bin/bash 35 | ;; 36 | *) 37 | echo "metrics-utils enter (influxdb||chronograf||kapacitor||telegraf||grafana)" 38 | ;; 39 | esac 40 | } 41 | 42 | # Logs streams the logs from the container to the shell 43 | logs () { 44 | case $2 in 45 | influxdb|chronograf|kapacitor|telegraf|grafana) 46 | echo "Following the logs from the $2 container..." 47 | docker-compose logs -f $2 48 | ;; 49 | *) 50 | echo "metrics-utils logs (influxdb||chronograf||kapacitor||telegraf||grafana)" 51 | ;; 52 | esac 53 | } 54 | 55 | case $1 in 56 | up) 57 | echo "Spinning up Docker Images..." 58 | echo "If this is your first time starting metrics this might take a minute..." 59 | docker-compose up -d 60 | ;; 61 | down) 62 | echo "Stopping metrics containers..." 63 | docker-compose down 64 | ;; 65 | restart) 66 | echo "Stopping all metrics processes..." 67 | docker-compose down > /dev/null 2>&1 68 | echo "Starting all metrics processes..." 69 | docker-compose up -d > /dev/null 2>&1 70 | echo "Services available!" 71 | ;; 72 | influxdb) 73 | echo "Entering the influx cli..." 74 | docker-compose exec influxdb /usr/bin/influx 75 | ;; 76 | enter) 77 | enter $@ 78 | ;; 79 | logs) 80 | logs $@ 81 | ;; 82 | *) 83 | cat <<-EOF 84 | metrics-utils commands: 85 | up -> spin up the metrics 86 | down -> tear down the metrics 87 | restart -> restart the metrics 88 | influxdb -> attach to the influx cli 89 | 90 | enter (influxdb||kapacitor||chronograf||telegraf||grafana) -> enter the specified container 91 | logs (influxdb||kapacitor||chronograf||telegraf||grafana) -> stream logs for the specified container 92 | EOF 93 | ;; 94 | esac 95 | } 96 | 97 | pushd `dirname $0` > /dev/null 98 | main $@ 99 | popd > /dev/null 100 | -------------------------------------------------------------------------------- /src/docker/influxdb/config/influxdb.conf: -------------------------------------------------------------------------------- 1 | reporting-disabled = false 2 | bind-address = ":8088" 3 | 4 | [meta] 5 | dir = "/var/lib/influxdb/meta" 6 | retention-autocreate = true 7 | logging-enabled = true 8 | 9 | [data] 10 | dir = "/var/lib/influxdb/data" 11 | wal-dir = "/var/lib/influxdb/wal" 12 | query-log-enabled = true 13 | cache-max-memory-size = 1073741824 14 | cache-snapshot-memory-size = 26214400 15 | cache-snapshot-write-cold-duration = "10m0s" 16 | compact-full-write-cold-duration = "4h0m0s" 17 | max-series-per-database = 1000000 18 | max-values-per-tag = 100000 19 | index-version = "tsi1" 20 | trace-logging-enabled = false 21 | 22 | [coordinator] 23 | write-timeout = "10s" 24 | max-concurrent-queries = 0 25 | query-timeout = "0s" 26 | log-queries-after = "0s" 27 | max-select-point = 0 28 | max-select-series = 0 29 | max-select-buckets = 0 30 | 31 | [retention] 32 | enabled = true 33 | check-interval = "30m0s" 34 | 35 | [shard-precreation] 36 | enabled = true 37 | check-interval = "10m0s" 38 | advance-period = "30m0s" 39 | 40 | [monitor] 41 | store-enabled = true 42 | store-database = "_internal" 43 | store-interval = "10s" 44 | 45 | [subscriber] 46 | enabled = true 47 | http-timeout = "30s" 48 | insecure-skip-verify = false 49 | ca-certs = "" 50 | write-concurrency = 40 51 | write-buffer-size = 1000 52 | 53 | [http] 54 | enabled = true 55 | flux-enabled = true 56 | bind-address = ":8086" 57 | auth-enabled = false 58 | log-enabled = true 59 | write-tracing = false 60 | pprof-enabled = true 61 | https-enabled = false 62 | https-certificate = "/etc/ssl/influxdb.pem" 63 | https-private-key = "" 64 | max-row-limit = 0 65 | max-connection-limit = 0 66 | shared-secret = "" 67 | realm = "InfluxDB" 68 | unix-socket-enabled = false 69 | bind-socket = "/var/run/influxdb.sock" 70 | 71 | [[graphite]] 72 | enabled = false 73 | bind-address = ":2003" 74 | database = "graphite" 75 | retention-policy = "120d" 76 | protocol = "tcp" 77 | batch-size = 5000 78 | batch-pending = 10 79 | batch-timeout = "1s" 80 | consistency-level = "one" 81 | separator = "." 82 | udp-read-buffer = 0 83 | 84 | [[collectd]] 85 | enabled = false 86 | bind-address = ":25826" 87 | database = "collectd" 88 | retention-policy = "120d" 89 | batch-size = 5000 90 | batch-pending = 10 91 | batch-timeout = "10s" 92 | read-buffer = 0 93 | typesdb = "/usr/share/collectd/types.db" 94 | security-level = "none" 95 | auth-file = "/etc/collectd/auth_file" 96 | 97 | [[opentsdb]] 98 | enabled = false 99 | bind-address = ":4242" 100 | database = "opentsdb" 101 | retention-policy = "120d" 102 | consistency-level = "one" 103 | tls-enabled = false 104 | certificate = "/etc/ssl/influxdb.pem" 105 | batch-size = 1000 106 | batch-pending = 5 107 | batch-timeout = "1s" 108 | log-point-errors = true 109 | 110 | #For Proxmox 111 | [[udp]] 112 | enabled = true 113 | bind-address = ":8089" 114 | database = "db_proxmox" 115 | retention-policy = "120d" 116 | batch-size = 1000 117 | batch-pending = 10 118 | read-buffer = 0 119 | batch-timeout = "1s" 120 | precision = "" 121 | 122 | #For Ceph 123 | #[[udp]] 124 | # enabled = true 125 | # bind-address = ":8094" 126 | # database = "db_ceph" 127 | # retention-policy = "120d" 128 | # batch-size = 1000 129 | # batch-pending = 10 130 | # read-buffer = 0 131 | # batch-timeout = "1s" 132 | # precision = "" 133 | 134 | [continuous_queries] 135 | log-enabled = true 136 | enabled = true 137 | run-interval = "1s" 138 | 139 | -------------------------------------------------------------------------------- /src/docker/telegraf/telegraf.conf: -------------------------------------------------------------------------------- 1 | [agent] 2 | interval = "5s" 3 | round_interval = true 4 | metric_batch_size = 1000 5 | metric_buffer_limit = 10000 6 | collection_jitter = "0s" 7 | flush_interval = "5s" 8 | flush_jitter = "0s" 9 | precision = "" 10 | debug = false 11 | quiet = false 12 | logfile = "" 13 | hostname = "$HOSTNAME" 14 | omit_hostname = false 15 | 16 | [[outputs.influxdb]] 17 | urls = ["http://influxdb:8086"] 18 | database = "telegraf" 19 | username = '' 20 | password = '' 21 | retention_policy = "" 22 | write_consistency = "any" 23 | timeout = "5s" 24 | [outputs.influxdb.tagdrop] 25 | influxdb_database = ["*"] 26 | 27 | [[outputs.influxdb]] 28 | urls = ["http://influxdb:8086"] 29 | database = "db_telegraf_proxmox" 30 | username = '' 31 | password = '' 32 | retention_policy = "" 33 | write_consistency = "any" 34 | timeout = "5s" 35 | tagexclude = ["influxdb_database"] 36 | [outputs.influxdb.tagpass] 37 | influxdb_database = ["db_telegraf_proxmox"] 38 | 39 | [[inputs.docker]] 40 | endpoint = "unix:///var/run/docker.sock" 41 | container_names = [] 42 | timeout = "5s" 43 | perdevice = true 44 | total = false 45 | 46 | [[inputs.diskio]] 47 | [[inputs.disk]] 48 | ignore_fs = ["tmpfs", "devtmpfs", "devfs", "iso9660", "overlay", "aufs", "squashfs"] 49 | 50 | [[inputs.net]] 51 | [[inputs.processes]] 52 | [[inputs.swap]] 53 | [[inputs.mem]] 54 | [[inputs.diskio]] 55 | [[inputs.cpu]] 56 | [[inputs.system]] 57 | [[inputs.influxdb]] 58 | urls = ["http://influxdb:8086/debug/vars"] 59 | 60 | [[inputs.syslog]] 61 | # ## Specify an ip or hostname with port - eg., tcp://localhost:6514, tcp://10.0.0.1:6514 62 | # ## Protocol, address and port to host the syslog receiver. 63 | # ## If no host is specified, then localhost is used. 64 | # ## If no port is specified, 6514 is used (RFC5425#section-4.1). 65 | server = "tcp://localhost:6514" 66 | 67 | #[[inputs.ping]] 68 | ## Hosts to send ping packets to. 69 | # urls = ["example.org"] 70 | 71 | # [inputs.disk.tags] 72 | # influxdb_database = "db_telegraf_proxmox" 73 | 74 | ## Method used for sending pings, can be either "exec" or "native". When set 75 | ## to "exec" the systems ping command will be executed. When set to "native" 76 | ## the plugin will send pings directly. 77 | ## 78 | ## While the default is "exec" for backwards compatibility, new deployments 79 | ## are encouraged to use the "native" method for improved compatibility and 80 | ## performance. 81 | # method = "exec" 82 | 83 | ## Number of ping packets to send per interval. Corresponds to the "-c" 84 | ## option of the ping command. 85 | # count = 1 86 | 87 | ## Time to wait between sending ping packets in seconds. Operates like the 88 | ## "-i" option of the ping command. 89 | # ping_interval = 1.0 90 | 91 | ## If set, the time to wait for a ping response in seconds. Operates like 92 | ## the "-W" option of the ping command. 93 | # timeout = 1.0 94 | 95 | ## If set, the total ping deadline, in seconds. Operates like the -w option 96 | ## of the ping command. 97 | # deadline = 10 98 | 99 | ## Interface or source address to send ping from. Operates like the -I or -S 100 | ## option of the ping command. 101 | # interface = "" 102 | 103 | ## Specify the ping executable binary. 104 | # binary = "ping" 105 | 106 | ## Arguments for ping command. When arguments is not empty, the command from 107 | ## the binary option will be used and other options (ping_interval, timeout, 108 | ## etc) will be ignored. 109 | # arguments = ["-c", "3"] 110 | 111 | ## Use only IPv6 addresses when resolving a hostname. 112 | # ipv6 = false -------------------------------------------------------------------------------- /src/docker/README.md: -------------------------------------------------------------------------------- 1 | # cv4pve-metrics 2 | 3 | [![license](https://img.shields.io/github/license/corsinvest/cv4pve-metrics.svg)](https://github.com/Corsinvest/cv4pve-metrics/blob/master/LICENSE.md) 4 | 5 | ## Copyright and License 6 | 7 | Copyright: Corsinvest Srl 8 | For licensing details please visit [LICENSE.md](https://github.com/Corsinvest/cv4pve-metrics/blob/master/LICENSE.md) 9 | 10 | ## Commercial Support 11 | 12 | This software is part of a suite of tools called cv4pve-tools. If you want commercial support, visit the [site](https://www.cv4pve-tools.com) 13 | 14 | ## Introduction 15 | 16 | Docker compose with InfluxDb, Telegraf, Kapacitor, Chronograf, Grafana for metrics Proxmox VE. 17 | 18 | ## Quick Start 19 | 20 | Download docker folder. 21 | 22 | Change file ".env" for your configuration. 23 | 24 | Change InfluxDB configuration [file](./influxdb/config/influxdb.conf) set database where Proxmox VE store metrics. 25 | 26 | ```ini 27 | [[udp]] 28 | database = "db_proxmox" 29 | ``` 30 | 31 | Remember the directory **${DATA_STORE}/grafana** must have the permission user and group 472:472 32 | 33 | ```sh 34 | # Replace with value 35 | sudo mkdir -p /grafana/data/ 36 | sudo chown 472:472 -R /grafana/data/ 37 | ``` 38 | 39 | To start the container with persistence you can use the following: 40 | 41 | ```sh 42 | docker-compose up -d 43 | ``` 44 | 45 | To stop the container launch: 46 | 47 | ```sh 48 | docker-compose down 49 | ``` 50 | 51 | metrics-util simplify management docker. 52 | 53 | ```txt 54 | metrics-util commands: 55 | up -> spin up the sandbox environment 56 | down -> tear down the sandbox environment 57 | restart -> restart the sandbox 58 | influxdb -> attach to the influx cli 59 | 60 | enter (influxdb||kapacitor||chronograf||telegraf||grafana) -> enter the specified container 61 | logs (influxdb||kapacitor||chronograf||telegraf||grafana) -> stream logs for the specified container 62 | ``` 63 | 64 | ## Mapped Ports 65 | 66 | ```text 67 | Host Container Service 68 | 3000 3000 grafana 69 | 8888 8888 chronograf 70 | 9092 9092 kapacitor 71 | 8086 8086 influxdb 72 | 8089 8089/udp influxdb 73 | ``` 74 | 75 | ## SSH 76 | 77 | ```sh 78 | docker exec -it bash 79 | ``` 80 | 81 | or 82 | 83 | ```sh 84 | metrics-util enter (influxdb||kapacitor||chronograf||telegraf||grafana) 85 | ``` 86 | 87 | ## Grafana 88 | 89 | Open http://localhost:3000 90 | 91 | ```sh 92 | # first login 93 | Username: admin 94 | Password: admin 95 | ``` 96 | 97 | ### Web Interface chronograf 98 | 99 | Open http://localhost:8888 100 | 101 | ### InfluxDB Shell (CLI) 102 | 103 | metrics-utils influxdb 104 | 105 | ## Proxmox VE configuration metrics 106 | 107 | For configuration see [External Metric Server](https://pve.proxmox.com/wiki/External_Metric_Server) 108 | 109 | Login in Proxmox VE and edit server definitions on your pve node by creating the file “/etc/pve/status.cfg”. 110 | 111 | ```sh 112 | nano /etc/pve/status.cfg 113 | ``` 114 | 115 | Add the following 116 | 117 | ```sh 118 | influxdb: 119 | server your-docker-ip-address 120 | port 8089 121 | ``` 122 | 123 | Restart service pvestatd 124 | 125 | ```sh 126 | pvestatd restart 127 | ``` 128 | 129 | ## Configure Grafana 130 | 131 | Create **DataSource** type InfluxDb using database ```db_telegraf_proxmox``` and ```db_proxmox```. 132 | 133 | Import dashboard from repository: 134 | 135 | * [Proxmox VE Home](https://grafana.com/grafana/dashboards/11416) 136 | * [Proxmox VE Alert](https://grafana.com/grafana/dashboards/11418) 137 | * [Proxmox VE cv4pve-autosnap](https://grafana.com/grafana/dashboards/13099) 138 | * [Proxmox VE Backup VZDump](https://grafana.com/grafana/dashboards/12907) 139 | * [Proxmox VE KVM](https://grafana.com/grafana/dashboards/12908) 140 | * [Proxmox VE Network](https://grafana.com/grafana/dashboards/12909) 141 | * [Proxmox VE Node](https://grafana.com/grafana/dashboards/12910) 142 | * [Proxmox VE Node Detailed](https://grafana.com/grafana/dashboards/12911) 143 | * [Proxmox VE Node IPMI](https://grafana.com/grafana/dashboards/12912) 144 | * [Proxmox VE Sensors](https://grafana.com/grafana/dashboards/12913) 145 | * [Proxmox VE Storage](https://grafana.com/grafana/dashboards/12914) 146 | * [Proxmox VE Syslog](https://grafana.com/grafana/dashboards/12915) 147 | 148 | ## [Telegraf inside node Proxmox VE](../telegraf-pve-node/README.md) 149 | 150 | ## [Scripts hook](../scripts-hook/README.md) 151 | -------------------------------------------------------------------------------- /src/docker/kapacitor/config/kapacitor.conf: -------------------------------------------------------------------------------- 1 | hostname = "localhost" 2 | data_dir = "/var/lib/kapacitor" 3 | skip-config-overrides = false 4 | default-retention-policy = "" 5 | 6 | [http] 7 | bind-address = ":9092" 8 | auth-enabled = false 9 | log-enabled = true 10 | write-tracing = false 11 | pprof-enabled = false 12 | https-enabled = false 13 | https-certificate = "/etc/ssl/kapacitor.pem" 14 | shutdown-timeout = "10s" 15 | shared-secret = "" 16 | 17 | [replay] 18 | dir = "/var/lib/kapacitor/replay" 19 | 20 | [storage] 21 | boltdb = "/var/lib/kapacitor/kapacitor.db" 22 | 23 | [task] 24 | dir = "/var/lib/kapacitor/tasks" 25 | snapshot-interval = "1m0s" 26 | 27 | [[influxdb]] 28 | enabled = true 29 | name = "default" 30 | default = false 31 | urls = ["http://influxdb:8086"] 32 | username = "" 33 | password = "" 34 | ssl-ca = "" 35 | ssl-cert = "" 36 | ssl-key = "" 37 | insecure-skip-verify = false 38 | timeout = "0s" 39 | disable-subscriptions = false 40 | subscription-protocol = "http" 41 | kapacitor-hostname = "" 42 | http-port = 0 43 | udp-bind = "" 44 | udp-buffer = 1000 45 | udp-read-buffer = 0 46 | startup-timeout = "5m0s" 47 | subscriptions-sync-interval = "1m0s" 48 | [influxdb.excluded-subscriptions] 49 | _kapacitor = ["autogen"] 50 | 51 | [logging] 52 | file = "STDERR" 53 | level = "INFO" 54 | 55 | [config-override] 56 | enabled = true 57 | 58 | [collectd] 59 | enabled = false 60 | bind-address = ":25826" 61 | database = "collectd" 62 | retention-policy = "" 63 | batch-size = 5000 64 | batch-pending = 10 65 | batch-timeout = "10s" 66 | read-buffer = 0 67 | typesdb = "/usr/share/collectd/types.db" 68 | 69 | [opentsdb] 70 | enabled = false 71 | bind-address = ":4242" 72 | database = "opentsdb" 73 | retention-policy = "" 74 | consistency-level = "one" 75 | tls-enabled = false 76 | certificate = "/etc/ssl/influxdb.pem" 77 | batch-size = 1000 78 | batch-pending = 5 79 | batch-timeout = "1s" 80 | log-point-errors = true 81 | 82 | [alerta] 83 | enabled = false 84 | url = "" 85 | token = "" 86 | environment = "" 87 | origin = "" 88 | 89 | [hipchat] 90 | enabled = false 91 | url = "" 92 | token = "" 93 | room = "" 94 | global = false 95 | state-changes-only = false 96 | 97 | [opsgenie] 98 | enabled = false 99 | api-key = "" 100 | url = "https://api.opsgenie.com/v1/json/alert" 101 | recovery_url = "https://api.opsgenie.com/v1/json/alert/note" 102 | global = false 103 | 104 | [pagerduty] 105 | enabled = false 106 | url = "https://events.pagerduty.com/generic/2010-04-15/create_event.json" 107 | service-key = "" 108 | global = false 109 | 110 | [smtp] 111 | enabled = false 112 | host = "localhost" 113 | port = 25 114 | username = "" 115 | password = "" 116 | no-verify = false 117 | global = false 118 | state-changes-only = false 119 | from = "" 120 | idle-timeout = "30s" 121 | 122 | [sensu] 123 | enabled = false 124 | addr = "" 125 | source = "Kapacitor" 126 | 127 | [slack] 128 | enabled = false 129 | url = "" 130 | channel = "" 131 | username = "kapacitor" 132 | icon-emoji = "" 133 | global = false 134 | state-changes-only = false 135 | 136 | [talk] 137 | enabled = false 138 | url = "" 139 | author_name = "" 140 | 141 | [telegram] 142 | enabled = false 143 | url = "https://api.telegram.org/bot" 144 | token = "" 145 | chat-id = "" 146 | parse-mode = "" 147 | disable-web-page-preview = false 148 | disable-notification = false 149 | global = false 150 | state-changes-only = false 151 | 152 | [victorops] 153 | enabled = false 154 | api-key = "" 155 | routing-key = "" 156 | url = "https://alert.victorops.com/integrations/generic/20131114/alert" 157 | global = false 158 | 159 | [kubernetes] 160 | enabled = false 161 | in-cluster = false 162 | token = "" 163 | ca-path = "" 164 | namespace = "" 165 | 166 | [reporting] 167 | enabled = true 168 | url = "https://usage.influxdata.com" 169 | 170 | [stats] 171 | enabled = true 172 | stats-interval = "10s" 173 | database = "_kapacitor" 174 | retention-policy = "autogen" 175 | timing-sample-rate = 0.1 176 | timing-movavg-size = 1000 177 | 178 | [udf] 179 | 180 | [deadman] 181 | interval = "10s" 182 | threshold = 0.0 183 | id = "{{ .Group }}:NODE_NAME for task '{{ .TaskName }}'" 184 | message = "{{ .ID }} is {{ if eq .Level \"OK\" }}alive{{ else }}dead{{ end }}: {{ index .Fields \"emitted\" | printf \"%0.3f\" }} points/INTERVAL." 185 | global = false 186 | 187 | -------------------------------------------------------------------------------- /src/docker/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | services: 3 | influxdb: 4 | # Full tag list: https://hub.docker.com/r/library/influxdb/tags/ 5 | container_name: cv4pve-metrics-influxdb 6 | image: influxdb:1.8 7 | ports: 8 | # The API for InfluxDB is served on port 8086 9 | - '8086:8086' 10 | - '8089:8089/udp' 11 | logging: 12 | driver: "json-file" 13 | options: 14 | max-size: "10m" 15 | max-file: "10" 16 | volumes: 17 | # Mount for influxdb data directory 18 | - ${DATA_STORE}/influxdb/data:/var/lib/influxdb 19 | # Mount for influxdb configuration 20 | - ./influxdb/config/:/etc/influxdb/ 21 | restart: always 22 | 23 | chronograf: 24 | # Full tag list: https://hub.docker.com/r/library/chronograf/tags/ 25 | container_name: cv4pve-metrics-chronograf 26 | image: chronograf 27 | environment: 28 | - INFLUXDB_URL=http://influxdb:8086 29 | - INFLUXDB_USERNAME= 30 | - INFLUXDB_PASSWORD= 31 | - KAPACITOR_URL=http://kapacitor:9092 32 | - KAPACITOR_USERNAME= 33 | - KAPACITOR_PASSWORD= 34 | volumes: 35 | # Mount for chronograf database 36 | - ${DATA_STORE}/chronograf/data:/var/lib/chronograf/ 37 | # Mount for kapacitor configuration 38 | - ./kapacitor/config/:/etc/kapacitor/ 39 | ports: 40 | - "8888:8888" 41 | links: 42 | - kapacitor 43 | - influxdb 44 | - telegraf 45 | restart: always 46 | 47 | kapacitor: 48 | # Full tag list: https://hub.docker.com/r/library/kapacitor/tags/ 49 | container_name: cv4pve-metrics-kapacitor 50 | image: kapacitor 51 | volumes: 52 | # Mount for kapacitor data directory 53 | - ${DATA_STORE}/kapacitor/data:/var/lib/kapacitor 54 | # Mount for kapacitor configuration 55 | - ./kapacitor/config/:/etc/kapacitor/ 56 | # Kapacitor requires network access to Influxdb 57 | links: 58 | - influxdb 59 | ports: 60 | # The API for Kapacitor is served on port 9092 61 | - "9092:9092" 62 | restart: always 63 | 64 | telegraf: 65 | # Full tag list: https://hub.docker.com/r/library/telegraf/tags/ 66 | container_name: cv4pve-metrics-telegraf 67 | image: telegraf 68 | environment: 69 | HOSTNAME: "docker" 70 | volumes: 71 | # Mount for telegraf configuration 72 | - ./telegraf/:/etc/telegraf/ 73 | # Mount for Docker API access 74 | - /var/run/docker.sock:/var/run/docker.sock 75 | # Telegraf requires network access to InfluxDB 76 | links: 77 | - influxdb 78 | depends_on: 79 | - influxdb 80 | restart: always 81 | 82 | grafana: 83 | container_name: cv4pve-metrics-grafana 84 | image: grafana/grafana:6.5.2 85 | environment: 86 | #plugins install 87 | GF_INSTALL_PLUGINS: "satellogic-3d-globe-panel,ryantxu-ajax-panel,btplc-alarm-box-panel,ryantxu-annolist-panel,novalabs-annotations-panel,michaeldmoore-annunciator-panel,farski-blendstat-panel,yesoreyeram-boomtable-panel,yesoreyeram-boomtheme-panel,digiapulssi-breadcrumb-panel,neocat-cal-heatmap-panel,petrslavotinek-carpetplot-panel,grafana-clock-panel,briangann-gauge-panel,briangann-datatable-panel,jdbranham-diagram-panel,natel-discrete-panel,larona-epict-panel,agenty-flowcharting-panel,citilogics-geoloop-panel,savantly-heatmap-panel,mtanda-heatmap-epoch-panel,mtanda-histogram-panel,pierosavi-imageit-panel,natel-influx-admin-panel,michaeldmoore-multistat-panel,digiapulssi-organisations-panel,zuburqan-parity-report-panel,btplc-peak-report-panel,bessler-pictureit-panel,grafana-piechart-panel,natel-plotly-panel,grafana-polystat-panel,corpglory-progresslist-panel,snuids-radar-panel,scadavis-synoptic-panel,mxswat-separator-panel,blackmirror1-singlestat-math-panel,blackmirror1-statusbygroup-panel,btplc-status-dot-panel,vonage-status-panel,flant-statusmap-panel,marcuscalidus-svg-panel,gretamosa-topology-panel,alexandra-trackmap-panel,snuids-trafficlights-panel,smartmakers-trafficlight-panel,btplc-trend-box-panel,fatcloud-windrose-panel,grafana-worldmap-panel" 88 | ports: 89 | - '3000:3000' 90 | user: "472" 91 | volumes: 92 | - ./grafana/config/grafana.ini:/etc/grafana/grafana.ini 93 | - ${DATA_STORE}/grafana/data:/var/lib/grafana 94 | 95 | #index 96 | #- ./grafana/web/views/index.html:/usr/share/grafana/public/views/index.html 97 | 98 | #icons 99 | - ./grafana/web/images/grafana_icon.svg:/usr/share/grafana/public/img/grafana_icon.svg 100 | - ./grafana/web/images/grafana_typelogo.svg:/usr/share/grafana/public/img/grafana_typelogo.svg 101 | - ./grafana/web/images/heatmap_bg_test.svg:/usr/share/grafana/public/img/heatmap_bg_test.svg 102 | - ./grafana/web/images/fav32.png:/usr/share/grafana/public/img/fav32.png 103 | - ./grafana/web/images/grafana_mask_icon.svg:/usr/share/grafana/public/img/grafana_mask_icon.svg 104 | - ./grafana/web/images/apple-touch-icon.png:/usr/share/grafana/public/img/apple-touch-icon.png 105 | 106 | #email templates 107 | - ./grafana/emails:/usr/share/grafana/public/emails 108 | depends_on: 109 | - influxdb 110 | restart: always -------------------------------------------------------------------------------- /src/docker/grafana/web/views/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Grafana 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 166 | 167 |
168 |
169 |
170 | 171 |
172 |
173 |
Loading Grafana
174 |
175 |

176 | If you're seeing this Grafana has failed to load its application files 177 |
178 |
179 |

180 |

181 | 1. This could be caused by your reverse proxy settings.

182 | 2. If you host grafana under subpath make sure your grafana.ini root_url setting includes subpath

183 | 3. If you have a local dev build make sure you build frontend using: yarn start, yarn start:hot, or yarn build

184 | 4. Sometimes restarting grafana-server can help
185 |

186 |
187 |
188 | 189 | 190 | 191 | 192 | 193 | 194 |
195 |
196 |
197 | 198 | 226 |
227 |
228 |
229 | 230 | 245 | 246 | [[if .GoogleTagManagerId]] 247 | 248 | 258 | 261 | 265 | 266 | [[end]] 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 282 | 283 | 284 | 285 | -------------------------------------------------------------------------------- /src/docker/grafana/emails/reset_password.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 168 | 169 | 170 | 171 | 172 | 275 | 276 |
173 |
174 | 175 | 176 | 198 | 199 |
177 |
178 | 179 | 180 | 181 | 193 | 194 |
182 | 183 | 184 | 185 | 188 | 189 | 190 |
186 | 187 |
191 | 192 |
195 | 196 |
197 |
200 | 201 | 202 | 203 | 204 | 205 | 206 | 252 | 253 |
207 | {{Subject .Subject "Reset your Grafana password - {{.Name}}"}} 208 | 209 | 210 | 211 | 223 | 224 |
212 | 213 | 214 | 215 | 218 | 219 | 220 |
216 |

Hi {{.Name}},

217 |
221 | 222 |
225 | 226 | 227 | 228 | 245 | 246 |
229 | 230 | 231 | 240 | 241 | 242 |
232 |

233 | Please click the following link to reset your password within {{.EmailCodeValidHours}} hours. 234 |

235 |

236 | {{.AppUrl}}user/password/reset?code={{.Code}} 237 |

238 |

Not working? Try copying and pasting it to your browser.

239 |
243 | 244 |
247 | 248 | 249 | 250 | 251 |
254 | 255 | 256 | 257 | 271 | 272 | 273 |
274 |
277 | 278 | 279 | -------------------------------------------------------------------------------- /src/docker/grafana/emails/welcome_on_signup.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 168 | 169 | 170 | 171 | 172 | 282 | 283 |
173 |
174 | 175 | 176 | 198 | 199 |
177 |
178 | 179 | 180 | 181 | 193 | 194 |
182 | 183 | 184 | 185 | 188 | 189 | 190 |
186 | 187 |
191 | 192 |
195 | 196 |
197 |
200 | 201 | 202 | 203 | 204 | 205 | 206 | 259 | 260 |
207 | {{Subject .Subject "Welcome to Metrics"}} 208 | 209 | 210 | 211 | 228 | 229 |
212 | 213 | 214 | 215 | 218 | 219 | 220 | 221 | 224 | 225 |
216 |

Hi {{.Name}},

217 |
222 | Welcome! Ready to start building some beautiful metric and analytic dashboards? 223 |
226 | 227 |
230 | 231 | 232 | 233 | 252 | 253 |
234 | 235 | 236 | 241 | 242 | 243 | 244 | 249 | 250 |
237 |

238 | If you are new to Metrics please read the Getting Started guide. 239 |

240 |
245 | Thank you for joining our community. 246 |
247 |

The Metric Team

248 |
251 |
254 | 255 | 256 | 257 | 258 |
261 | 262 | 263 | 264 | 278 | 279 | 280 |
281 |
284 | 285 | 286 | -------------------------------------------------------------------------------- /src/docker/grafana/emails/signup_started.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 168 | 169 | 170 | 171 | 172 | 279 | 280 |
173 |
174 | 175 | 176 | 198 | 199 |
177 |
178 | 179 | 180 | 181 | 193 | 194 |
182 | 183 | 184 | 185 | 188 | 189 | 190 |
186 | 187 |
191 | 192 |
195 | 196 |
197 |
200 | 201 | 202 | 203 | 204 | 205 | 206 | 256 | 257 |
207 | {{Subject .Subject "Welcome to Grafana, please complete your sign up!"}} 208 | 209 | 210 | 211 | 223 | 224 |
212 | 213 | 214 | 215 | 218 | 219 | 220 |
216 |

Complete the signup

217 |
221 | 222 |
225 | 226 | 227 | 228 | 249 | 250 |
229 | 230 | 231 | 236 | 237 | 238 | 239 | 246 | 247 |
232 | Copy and past the email verification code:
233 | {{.Code}}
in 234 | the sign up form or use the link below. 235 |
240 | 241 | 242 | 243 | 244 |
Complete Sign Up
245 |
248 |
251 | 252 | 253 | 254 | 255 |
258 | 259 | 260 | 261 | 275 | 276 | 277 |
278 |
281 | 282 | 283 | -------------------------------------------------------------------------------- /src/docker/grafana/emails/invited_to_org.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 168 | 169 | 170 | 171 | 172 | 280 | 281 |
173 |
174 | 175 | 176 | 198 | 199 |
177 |
178 | 179 | 180 | 181 | 193 | 194 |
182 | 183 | 184 | 185 | 188 | 189 | 190 |
186 | 187 |
191 | 192 |
195 | 196 |
197 |
200 | 201 | 202 | 203 | 204 | 205 | 206 | 257 | 258 |
207 | 208 | 209 | {{Subject .Subject "{{.InvitedBy}} has added you to the {{.OrgName}} organization"}} 210 | 211 | 212 | 213 | 225 | 226 |
214 | 215 | 216 | 217 | 220 | 221 | 222 |
218 |

You have been added to {{.OrgName}}

219 |
223 | 224 |
227 | 228 | 229 | 230 | 250 | 251 |
231 | 232 | 233 | 237 | 238 | 239 | 240 | 247 | 248 |
234 |

{{.InvitedBy}} has added you to the {{.OrgName}} organization in Metrics. 235 |

Once logged in, {{.OrgName}} will be available in the left side menu, in the dropdown below your username.

236 |
241 | 242 | 243 | 244 | 245 |
Log in now
246 |
249 |
252 | 253 | 254 | 255 | 256 |
259 | 260 | 261 | 262 | 276 | 277 | 278 |
279 |
282 | 283 | 284 | -------------------------------------------------------------------------------- /src/docker/grafana/emails/new_user_invite.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 168 | 169 | 170 | 171 | 172 | 281 | 282 |
173 |
174 | 175 | 176 | 198 | 199 |
177 |
178 | 179 | 180 | 181 | 193 | 194 |
182 | 183 | 184 | 185 | 188 | 189 | 190 |
186 | 187 |
191 | 192 |
195 | 196 |
197 |
200 | 201 | 202 | 203 | 204 | 205 | 206 | 258 | 259 |
207 | 208 | 209 | {{Subject .Subject "{{.InvitedBy}} has invited you to join Metrics"}} 210 | 211 | 212 | 213 | 225 | 226 |
214 | 215 | 216 | 217 | 220 | 221 | 222 |
218 |

You're invited to join {{.OrgName}}

219 |
223 | 224 |
227 | 228 | 229 | 230 | 254 | 255 |
231 | 232 | 233 | 236 | 237 | 238 | 245 | 246 | 247 | 250 | 251 | 252 |
234 |

You've been invited to join the {{.OrgName}} organization by {{.InvitedBy}}. To accept your invitation and join the team, please click the link below:

235 |
239 | 240 | 241 | 242 | 243 |
Accept Invitation
244 |
248 |

You can also copy/paste this link into your browser directly: {{.LinkUrl}}

249 |
253 |
256 | 257 |
260 | 261 | 262 | 263 | 277 | 278 | 279 |
280 |
283 | 284 | 285 | -------------------------------------------------------------------------------- /src/docker/grafana/config/grafana.ini: -------------------------------------------------------------------------------- 1 | ##################### Grafana Configuration Defaults ##################### 2 | # 3 | # Do not modify this file in grafana installs 4 | # 5 | 6 | # possible values : production, development 7 | app_mode = production 8 | 9 | # instance name, defaults to HOSTNAME environment variable value or hostname if HOSTNAME var is empty 10 | instance_name = ${HOSTNAME} 11 | 12 | #################################### Paths ############################### 13 | [paths] 14 | # Path to where grafana can store temp files, sessions, and the sqlite3 db (if that is used) 15 | data = data 16 | 17 | # Temporary files in `data` directory older than given duration will be removed 18 | temp_data_lifetime = 24h 19 | 20 | # Directory where grafana can store logs 21 | logs = data/log 22 | 23 | # Directory where grafana will automatically scan and look for plugins 24 | plugins = data/plugins 25 | 26 | # folder that contains provisioning config files that grafana will apply on startup and while running. 27 | provisioning = conf/provisioning 28 | 29 | #################################### Server ############################## 30 | [server] 31 | # Protocol (http, https, h2, socket) 32 | protocol = http 33 | 34 | # The ip address to bind to, empty will bind to all interfaces 35 | http_addr = 36 | 37 | # The http port to use 38 | http_port = 3000 39 | 40 | # The public facing domain name used to access grafana from a browser 41 | domain = localhost 42 | 43 | # Redirect to correct domain if host header does not match domain 44 | # Prevents DNS rebinding attacks 45 | enforce_domain = false 46 | 47 | # The full public facing url 48 | root_url = %(protocol)s://%(domain)s:%(http_port)s/ 49 | 50 | # Serve Grafana from subpath specified in `root_url` setting. By default it is set to `false` for compatibility reasons. 51 | serve_from_sub_path = false 52 | 53 | # Log web requests 54 | router_logging = false 55 | 56 | # the path relative working path 57 | static_root_path = public 58 | 59 | # enable gzip 60 | enable_gzip = false 61 | 62 | # https certs & key file 63 | cert_file = 64 | cert_key = 65 | 66 | # Unix socket path 67 | socket = /tmp/grafana.sock 68 | 69 | #################################### Database ############################ 70 | [database] 71 | # You can configure the database connection by specifying type, host, name, user and password 72 | # as separate properties or as on string using the url property. 73 | 74 | # Either "mysql", "postgres" or "sqlite3", it's your choice 75 | type = sqlite3 76 | host = 127.0.0.1:3306 77 | name = grafana 78 | user = root 79 | # If the password contains # or ; you have to wrap it with triple quotes. Ex """#password;""" 80 | password = 81 | # Use either URL or the previous fields to configure the database 82 | # Example: mysql://user:secret@host:port/database 83 | url = 84 | 85 | # Max idle conn setting default is 2 86 | max_idle_conn = 2 87 | 88 | # Max conn setting default is 0 (mean not set) 89 | max_open_conn = 90 | 91 | # Connection Max Lifetime default is 14400 (means 14400 seconds or 4 hours) 92 | conn_max_lifetime = 14400 93 | 94 | # Set to true to log the sql calls and execution times. 95 | log_queries = 96 | 97 | # For "postgres", use either "disable", "require" or "verify-full" 98 | # For "mysql", use either "true", "false", or "skip-verify". 99 | ssl_mode = disable 100 | 101 | ca_cert_path = 102 | client_key_path = 103 | client_cert_path = 104 | server_cert_name = 105 | 106 | # For "sqlite3" only, path relative to data_path setting 107 | path = grafana.db 108 | 109 | # For "sqlite3" only. cache mode setting used for connecting to the database 110 | cache_mode = private 111 | 112 | #################################### Cache server ############################# 113 | [remote_cache] 114 | # Either "redis", "memcached" or "database" default is "database" 115 | type = database 116 | 117 | # cache connectionstring options 118 | # database: will use Grafana primary database. 119 | # redis: config like redis server e.g. `addr=127.0.0.1:6379,pool_size=100,db=0,ssl=false`. Only addr is required. ssl may be 'true', 'false', or 'insecure'. 120 | # memcache: 127.0.0.1:11211 121 | connstr = 122 | 123 | #################################### Data proxy ########################### 124 | [dataproxy] 125 | 126 | # This enables data proxy logging, default is false 127 | logging = false 128 | 129 | # How long the data proxy should wait before timing out default is 30 (seconds) 130 | timeout = 30 131 | 132 | # If enabled and user is not anonymous, data proxy will add X-Grafana-User header with username into the request, default is false. 133 | send_user_header = false 134 | 135 | #################################### Analytics ########################### 136 | [analytics] 137 | # Server reporting, sends usage counters to stats.grafana.org every 24 hours. 138 | # No ip addresses are being tracked, only simple counters to track 139 | # running instances, dashboard and error counts. It is very helpful to us. 140 | # Change this option to false to disable reporting. 141 | reporting_enabled = true 142 | 143 | # Set to false to disable all checks to https://grafana.com 144 | # for new versions (grafana itself and plugins), check is used 145 | # in some UI views to notify that grafana or plugin update exists 146 | # This option does not cause any auto updates, nor send any information 147 | # only a GET request to https://grafana.com to get latest versions 148 | check_for_updates = true 149 | 150 | # Google Analytics universal tracking code, only enabled if you specify an id here 151 | google_analytics_ua_id = 152 | 153 | # Google Tag Manager ID, only enabled if you specify an id here 154 | google_tag_manager_id = 155 | 156 | #################################### Security ############################ 157 | [security] 158 | # disable creation of admin user on first start of grafana 159 | disable_initial_admin_creation = false 160 | 161 | # default admin user, created on startup 162 | admin_user = admin 163 | 164 | # default admin password, can be changed before first start of grafana, or in profile settings 165 | admin_password = admin 166 | 167 | # used for signing 168 | secret_key = SW2YcwTIb9zpOOhoPsMm 169 | 170 | # disable gravatar profile images 171 | disable_gravatar = false 172 | 173 | # data source proxy whitelist (ip_or_domain:port separated by spaces) 174 | data_source_proxy_whitelist = 175 | 176 | # disable protection against brute force login attempts 177 | disable_brute_force_login_protection = false 178 | 179 | # set to true if you host Grafana behind HTTPS. default is false. 180 | cookie_secure = false 181 | 182 | # set cookie SameSite attribute. defaults to `lax`. can be set to "lax", "strict" and "none" 183 | cookie_samesite = lax 184 | 185 | # set to true if you want to allow browsers to render Grafana in a ,