Comments (8)
@yankcrime @nrdmn any idea? this problem still persists and documentation in README.md does not help with it.
from puppet-telegraf.
more information on this matter:
- hiera v5
- gems deep_merge, toml-rb are installed
- #99 does apparently not resolve my problem
- output of
puppet lookup --environment production --merge deep --render-as yaml --node nodename "telegraf::inputs"
is correct - this issue is not limited to procstat input (tested with nginx, too)
- there is no spec test for this situation
- README.md is outdated
from puppet-telegraf.
full (deep merged) example (output of above lookup command):
hiera:
---
nginx:
- urls:
- http://localhost/nginx_status
response_timeout: 5s
- urls:
- http://127.0.0.1/nginx_status
response_timeout: 5s
procstat:
- pattern: nginx
pid_tag: true
- pattern: php.*-fpm
pid_tag: true
cpu:
- percpu: true
totalcpu: true
disk:
- ignore_fs:
- tmpfs
- devtmpfs
- devfs
diskio:
- {}
kernel:
- {}
mem:
- {}
processes:
- {}
swap:
- {}
system:
- {}
net:
- interfaces:
- eth*
- en*
netstat:
- {}
telegraf.conf
#
# INPUTS:
#
[[inputs.cpu]]
percpu = true
totalcpu = true
[[inputs.disk]]
ignore_fs = ["tmpfs", "devtmpfs", "devfs"]
[[inputs.diskio]]
[[inputs.kernel]]
[[inputs.mem]]
[[inputs.net]]
interfaces = ["eth*", "en*"]
[[inputs.netstat]]
[[inputs.nginx]]
response_timeout = "5s"
urls = ["http://localhost/nginx_status"]
[[inputs.processes]]
[[inputs.procstat]]
pattern = "nginx"
pid_tag = true
[[inputs.swap]]
[[inputs.system]]
from puppet-telegraf.
I've just stumbled upon the same problem.
The module configuration basically doesn't follow the "object list" pattern that double square braquets
actually mean...
The only solution I found is to just create separate files.
from puppet-telegraf.
Same problem here but with windows. Multiples 'win_perf_counters.object' but only last is in telegraf configuration file.
from puppet-telegraf.
I lost track of this project - is this still a valid issue? Else I would suggest to close this ticket.
from puppet-telegraf.
Hi,
I have same problem, twice ...
first ... I was unable to add two snmp inputs, for different hosts and options (sha/public ...), but I reconfigured the hosts, to avoid the problem.
Now I have something like:
## 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.1/sdk" ]
username = "foo"
password = "bar"
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.1/sdk" ]
username = "foo"
password = "bar"
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
So I have no idea, how to get it working with Hiera. Maybe separate filenames are a solution, but I have problems with the syntax .. How to specify create files, instead of /etc/telegraf/telegraf.conf with Hiera ?
cu denny
Update
I've got it working ... had an old version from the module ... as example the vsphere plugin:
telegraf::inputs:
vsphere:
- vcenters:
- "https://192.168.1.1/sdk"
plugin_type: "vsphere"
interval: '60s'
username: "[email protected]"
password: "%{hiera('monitoring::vmware::dc::user::password')}"
vm_metric_include: "['*']"
host_metric_include: '[]'
cluster_metric_include: '[]'
max_query_metrics: 256
timeout: '60s'
insecure_skip_verify: true
- vcenters:
- "https://192.168.1.1/sdk"
plugin_type: "vsphere"
interval: '300s'
username: "[email protected]"
password: "%{hiera('monitoring::vmware::dc::user::password')}"
vm_metric_include: "['*']"
datastore_metric_include: [ "disk.capacity.latest", "disk.used.latest", "disk.provisioned.latest"]
max_query_metrics: 256
timeout: '60s'
collect_concurrency: 3
insecure_skip_verify: true
So now both are rendered correctly. In the same way, SNMP should work too :-)
from puppet-telegraf.
toml-rb doesn't indent correctly and restarting the service causes:
Jun 25 14:43:44 [REDACTED] telegraf[27450]: 2020-06-25T13:43:44Z E! [telegraf] Error running agent: Error parsing /etc/telegraf/telegraf.conf, line 37: invalid TOML syntax
line 37 is percpu = true
. note that there's no indentation.
#
# INPUTS:
#
[[inputs.cpu]]
percpu = true
totalcpu = true
[[inputs.disk]]
[[inputs.diskio]]
[[inputs.kernel]]
[[inputs.mem]]
[[inputs.net]]
[[inputs.ntpq]]
[[inputs.processes]]
[[inputs.swap]]
[[inputs.system]]
from puppet-telegraf.
Related Issues (20)
- [question] Are you open to using inifile instead of toml-rb? HOT 6
- org.jruby.exceptions.RaiseException: (LoadError) no such file to load -- toml-rb HOT 2
- Unable able to install previous versions of the module HOT 1
- Is there a way to set up multiple discreet influxdb outputs? HOT 1
- Broken $hostname default value when fact['networking'] is null HOT 1
- Problem with defining win_perf_counters input HOT 1
- Minor: Please fix the (>=5.0.0 < 7.0.0) to (>= 5.0.0 < 7.0.0) in the metadata for dependencies HOT 3
- Cannot install telegraf on Windows server because config_file_mode and config_folder_mode is undefined
- NO_PUBKEY on Ubuntu | Key has changed HOT 1
- No longer possible to configure tagpass and tagdrop HOT 1
- Release a new version with #160 included HOT 1
- Cannot use multifile plugin
- Correct hiera Syntax for telegraf::processors (with pull request #139) HOT 1
- new forge release to pickup metadata.json changes
- onceover test fail cannot load such file -- toml-rb
- InfluxData GPG key rotation
- Installs from influxdata repo can use stable repos
- telegraf user on debian now has _
- Add creates parameter to all archive resources
- Overly strict version constraint on puppetlabs-stdlib
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from puppet-telegraf.