Telegraf: E! Error parsing /etc/telegraf/telegraf.conf, line 1274: field corresponding to `context' is not defined in `*system.SystemStats'

Created on 13 Apr 2018  ·  5Comments  ·  Source: influxdata/telegraf

When I start telegraf I got error:

E! Error parsing /etc/telegraf/telegraf.conf, line 1274: field corresponding tocontextis not defined in*system.SystemStats'`

Can you tell me way? Thanks!

here is my configuration:

# # Read JMX metrics through Jolokia
   1270 # [[inputs.jolokia]]
   1271 #   ## This is the context root used to compose the jolokia url
   1272 #   ## NOTE that Jolokia requires a trailing slash at the end of the context root
   1273 #   ## NOTE that your jolokia security policy must allow for POST requests.
   1274     context = "/jolokia/"
   1275 #
   1276 #   ## This specifies the mode used
   1277 #   # mode = "proxy"
   1278 #   #
   1279 #   ## When in proxy mode this section is used to specify further
   1280 #   ## proxy address configurations.
   1281 #   ## Remember to change host address to fit your environment.
   1282 #   # [inputs.jolokia.proxy]
   1283 #   #   host = "127.0.0.1"
   1284 #   #   port = "8080"
   1285 #
   1286 #   ## Optional http timeouts
   1287 #   ##
   1288 #   ## response_header_timeout, if non-zero, specifies the amount of time to wait
   1289 #   ## for a server's response headers after fully writing the request.
   1290 #   # response_header_timeout = "3s"
   1291 #   ##
   1292 #   ## client_timeout specifies a time limit for requests made by this client.
   1293 #   ## Includes connection time, any redirects, and reading the response body.
   1294 #   # client_timeout = "4s"
   1295 #
   1296 #   ## Attribute delimiter
   1297 #   ##
   1298 #   ## When multiple attributes are returned for a single
   1299 #   ## [inputs.jolokia.metrics], the field name is a concatenation of the metric
   1300 #   ## name, and the attribute name, separated by the given delimiter.
   1301 #   # delimiter = "_"
   1302 #
   1303 #   ## List of servers exposing jolokia read service
   1304    [[inputs.jolokia.servers]]
   1305      name = "as-server-01"
   1306      host = "192.168.1.140"
   1307      port = "17890"
   1308      username = "admin"
   1309      password = "123456"

discussion

Most helpful comment

The reason you get this error is that the line with context is uncommented but the rest of the plugin, including the line with [[inputs.jolokia]], is commented out. This causes the option to be applied to the previous plugin above.

If you are just getting started you should use the jolokia2 plugin, as @NomNomSu suggests.

All 5 comments

Hi, It is just my guess but it looks like you use deprecated plugin try this one: https://github.com/influxdata/telegraf/tree/master/plugins/inputs/jolokia2

The reason you get this error is that the line with context is uncommented but the rest of the plugin, including the line with [[inputs.jolokia]], is commented out. This causes the option to be applied to the previous plugin above.

If you are just getting started you should use the jolokia2 plugin, as @NomNomSu suggests.

I discovered this negligence a few hours ago when I tried again. This was the first time I used it. Thank you very much!

在 2018年4月14日,02:14,Daniel Nelson <[email protected]notifications@github.com> 写道:

The reason you get this error is that the line with context is uncommented but the rest of the plugin, including the line with [[inputs.jolokia]], is commented out. This causes the option to be applied to the previous plugin above.

If you are just getting started you should use the jolokia2 plugin, as @NomNomSuhttps://github.com/NomNomSu suggests.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/influxdata/telegraf/issues/4019#issuecomment-381219118, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AJ57Louq_N54CeESvSw4t3AyS0Ux9LsNks5toOr1gaJpZM4TTJRK.

hi, i am trying to use grafana+influxdb+telegraf
I installed succesfully but when i try to run telegraf i am getting this error;

#[telegraf] Error running agent: Error parsing telegraf.conf, line 5780: field corresponding to `vcenters' is not defined in system.SystemStats

i checked telegraf with "journalctl -f", here is the output;

-- Logs begin at Mon 2019-09-16 15:57:35 +03. --
Sep 16 17:32:26 grafanasrv telegraf[1796]: 2019-09-16T14:32:26Z I! Starting Telegraf 1.12.1
Sep 16 17:32:26 grafanasrv telegraf[1796]: 2019-09-16T14:32:26Z E! [telegraf] Error running agent: Error parsing /etc/telegraf/telegraf.conf, line 5780: field corresponding to `vcenters' is not defined in system.SystemStats
Sep 16 17:32:26 grafanasrv systemd[1]: telegraf.service: Main process exited, code=exited, status=1/FAILURE
Sep 16 17:32:26 grafanasrv systemd[1]: telegraf.service: Failed with result 'exit-code'.
Sep 16 17:32:26 grafanasrv systemd[1]: telegraf.service: Service RestartSec=100ms expired, scheduling restart.
Sep 16 17:32:26 grafanasrv systemd[1]: telegraf.service: Scheduled restart job, restart counter is at 5.
Sep 16 17:32:26 grafanasrv systemd[1]: Stopped The plugin-driven server agent for reporting metrics into InfluxDB.
Sep 16 17:32:26 grafanasrv systemd[1]: telegraf.service: Start request repeated too quickly.
Sep 16 17:32:26 grafanasrv systemd[1]: telegraf.service: Failed with result 'exit-code'.
Sep 16 17:32:26 grafanasrv systemd[1]: Failed to start The plugin-driven server agent for reporting metrics into InfluxDB.

someone help me please?

@sdincsoy we try to reserve GitHub Issues for actionable bug reports or feature requests. Please ask general questions at the InfluxData Community site.
First thought is it sounds like your config is garbled, make sure vcenters is within the inputs.vsphere plugin config.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

SongYg picture SongYg  ·  3Comments

fahimeh2010 picture fahimeh2010  ·  3Comments

timhallinflux picture timhallinflux  ·  3Comments

Bregor picture Bregor  ·  3Comments

mabushey picture mabushey  ·  3Comments