Git Product home page Git Product logo

Comments (5)

telegraf-tiger avatar telegraf-tiger commented on June 2, 2024

Hello! I recommend posting this question in our Community Slack or Community Forums, we have a lot of talented community members there who could help answer your question more quickly. You can also learn more about Telegraf by enrolling at InfluxDB University for free!

Heads up, this issue will be automatically closed after 7 days of inactivity. Thank you!

from telegraf.

srebhan avatar srebhan commented on June 2, 2024

@JW623 without seeing the JSON input data, your (redacted) configuration and the output you expect it is really hard to say anything... Please also use the support channels suggested by our bot (forum & slack) for support questions like this!

from telegraf.

JW623 avatar JW623 commented on June 2, 2024

@JW623 without seeing the JSON input data, your (redacted) configuration and the output you expect it is really hard to say anything... Please also use the support channels suggested by our bot (forum & slack) for support questions like this!

Sorry my bad, here is my telegraf configuration

[[inputs.file]]
files = [""]
tagexclude = ["Status"]
data_format = "json"
tag_keys = ["Client", "Asset", "Tag", "Timestamp"]
json_time_key = "Timestamp"
json_time_format = "2006-01-02 02:00:00.0000000"
tagdrop = ["Status"]
  
[[outputs.postgresql]]
 connection = "host=localhost user=s password= dbname="

    schema = "public"
	name_override = ""

my json data

[
	{
		"Client": "B",
		"Asset": "ABCASSET",
		"Tag": "ABCTAG",
		"Value": 12.1235,
		"Status": 192,
		"Timestamp": "2023-08-17 02:00:00.0000000"
	},
	{
		"Client": "A",
		"Asset": "ABCASSET",
		"Tag": "ABCTAG",
		"Value": 13.1235,
		"Status": 192,
		"Timestamp": "2023-08-17 02:00:00.0000000"
	},
	{
		"Client": "B",
		"Asset": "ABCASSET",
		"Tag": "ABCTAG",
		"Value": 13.1235,
		"Status": 192,
		"Timestamp": "2023-08-17 03:00:00.0000000"
	},
	{
		"Client": "A",
		"Asset": "ABCASSET",
		"Tag": "ABCTAG",
		"Value": 14.1235,
		"Status": 192,
		"Timestamp": "2023-08-17 03:00:00.0000000"
	}
]

i would like to ignore Status from my data collection

from telegraf.

srebhan avatar srebhan commented on June 2, 2024

Status is not a tag but a field so using

[[inputs.file]]
  files = ["test_configs/jsontest_issue_15067.json"]
  data_format = "json"
  tag_keys = ["Client", "Asset", "Tag"]
  json_time_key = "Timestamp"
  json_time_format = "2006-01-02 02:00:00.0000000"

  fieldexclude = ["Status"]

will solve your issue!

from telegraf.

JW623 avatar JW623 commented on June 2, 2024
fieldexclude = ["Status"]

Yes it works ! thanks alot!

from telegraf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.