Skip to content

Instantly share code, notes, and snippets.

@manueldev
Last active August 7, 2023 09:42
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save manueldev/6b5acaad3453b00b9ba5bf02751f6142 to your computer and use it in GitHub Desktop.
Save manueldev/6b5acaad3453b00b9ba5bf02751f6142 to your computer and use it in GitHub Desktop.
Monitoreo UPS Inverter VP-5000 (WatchPower). Usando mpp-solar python librería https://github.com/jblance/mpp-solar, telegraf inputs.exec, influxdb y grafana
#/etc/sudoers.d/telegraf
Defaults:telegraf !requiretty, !syslog
telegraf ALL = NOPASSWD: /usr/local/bin/mpp-solar
[agent]
interval = "20s"
round_interval = true
metric_batch_size = 1000
metric_buffer_limit = 10000
collection_jitter = "0s"
flush_interval = "6s"
flush_jitter = "0s"
precision = "0s"
## Log at debug level.
debug = true
## Log only error level messages.
quiet = false
## Override default hostname, if empty use os.Hostname()
hostname = "upsradio"
## If set to true, do no set the "host" tag in the telegraf agent.
omit_hostname = false
###############################################################################
# OUTPUT PLUGINS #
###############################################################################
[[outputs.influxdb_v2]]
urls = ["http://influxdb_ip:8086"]
token = "token_influx_bucket"
organization = "org_name"
bucket = "name_bucket"
[[inputs.exec]]
commands = ["sudo mpp-solar -p /dev/hidraw0 -P PI30 --getstatus -o json"]
name_suffix = "_upsradio"
data_format = "json"
timeout = "20s"
interval = "7s"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment