Last active
May 28, 2020 12:44
-
-
Save dexalex84/79b7e29e22a3d75d2abc873021e2319d to your computer and use it in GitHub Desktop.
install TICK component
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat <<EOF | sudo tee /etc/yum.repos.d/influxdb.repo | |
[influxdb] | |
name = InfluxDB Repository - RHEL \$releasever | |
baseurl = https://repos.influxdata.com/rhel/\$releasever/\$basearch/stable | |
enabled = 1 | |
gpgcheck = 1 | |
gpgkey = https://repos.influxdata.com/influxdb.key | |
EOF | |
2) sudo yum makecache | |
3) sudo yum -y install influxdb vim curl | |
4) sudo systemctl start influxdb && sudo systemctl enable influxdb | |
5) | |
sudo firewall-cmd --add-port=8086/tcp --permanent | |
sudo firewall-cmd --reload | |
6) | |
$ sudo vim /etc/influxdb/influxdb.conf | |
[http] | |
auth-enabled = true | |
curl -XPOST "http://localhost:8086/query" --data-urlencode \ | |
"q=CREATE USER login WITH PASSWORD 'PASS' WITH ALL PRIVILEGES" | |
login:pass | |
Installing Grafana on CentOS 7 | |
1) | |
cat <<EOF | sudo tee /etc/yum.repos.d/grafana.repo | |
[grafana] | |
name=grafana | |
baseurl=https://packages.grafana.com/oss/rpm | |
repo_gpgcheck=1 | |
enabled=1 | |
gpgcheck=1 | |
gpgkey=https://packages.grafana.com/gpg.key | |
sslverify=1 | |
sslcacert=/etc/pki/tls/certs/ca-bundle.crt | |
EOF | |
2)sudo yum -y install grafana | |
3) | |
sudo systemctl start grafana-server | |
sudo systemctl enable grafana-server | |
4) | |
sudo firewall-cmd --add-port=3000/tcp --permanent | |
sudo firewall-cmd --reload | |
/etc/telegraf/telegraf.conf | |
[[outputs.influxdb]] | |
## The full HTTP or UDP endpoint URL for your InfluxDB instance. | |
## 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. | |
# urls = ["udp://localhost:8089"] # UDP endpoint example | |
urls = ["http://localhost:8086"] # required | |
## The target database for metrics (telegraf will create it if not exists). | |
database = "telegraf" # required | |
... | |
## Write timeout (for the InfluxDB client), formatted as a string. | |
## If not provided, will default to 5s. 0s means no timeout (not recommended). | |
timeout = "5s" | |
username = "LOGIN" | |
password = "PASS" | |
/etc/telegraf/telegraf.d/vsphere-stats.conf | |
## Realtime instance | |
[[inputs.vsphere]] | |
## List of vCenter URLs to be monitored. These three lines must be uncommented | |
## and edited for the plugin to work. | |
interval = "60s" | |
vcenters = [ "https://192.168.1.128/sdk" ] | |
username = "LOGIN" | |
password = "PASS" | |
vm_metric_include = [] | |
host_metric_include = [] | |
cluster_metric_include = [] | |
datastore_metric_exclude = ["*"] | |
max_query_metrics = 256 | |
timeout = "60s" | |
insecure_skip_verify = true | |
## Historical instance | |
[[inputs.vsphere]] | |
interval = "300s" | |
vcenters = [ "https://192.168.1.128/sdk" ] | |
username = "LOGIN" | |
password = "PASS" | |
datastore_metric_include = [ "disk.capacity.latest", "disk.used.latest", "disk.provisioned.latest" ] | |
insecure_skip_verify = true | |
force_discover_on_init = true | |
host_metric_exclude = ["*"] # Exclude realtime metrics | |
vm_metric_exclude = ["*"] # Exclude realtime metrics | |
max_query_metrics = 256 | |
collect_concurrency = 3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment