API request response
"mem_free": 14691360768,
http// /metric endpoint result
HELP idac_mem_free Telegraf collected metric
# TYPE idac_mem_free untyped
idac_mem_freeactivity_statusonlinehostxxx3hostnamechasvlxxx.domain.netid32af28d7siteCHAurlhttps://app/v1/processes 1.468827648e+10
Value (format) 1.468827648e+10 have been changed for some reasons I don’t know why??
Anyone how have any explanation and best of all solution?
# Read formatted metrics from one or more HTTP endpoints
[[inputs.http]]
## One or more URLs from which to read formatted metrics.
urls = [
"https://app/v1/processes"
]
## HTTP method
method = "GET"
## Optional HTTP headers
headers = {"Authorization" = "Basic ZDJjYTI4ZWEtYzA1Mi00MGE2LTlmYjMtZTE1NWNjYmxxx2Y1ZjU5LWM2ZWYtNGMxOC1iMjQ1LTdhMxxxhNDcyZQ=="}
## HTTP entity-body to send with POST/PUT requests.
# body = ""
## HTTP Content-Encoding for write request body, can be set to "gzip" to
## compress body or "identity" to apply no encoding.
# content_encoding = "identity"
## Optional Bearer token settings to use for the API calls.
## Use either the token itself or the token file if you need a token.
# token = "eyJhbGc...Qssw5c"
# token_file = "/path/to/file"
## Optional HTTP Basic Auth Credentials
# username = "username"
# password = "pa$$word"
## OAuth2 Client Credentials. The options 'client_id', 'client_secret', and 'token_url' are required to use OAuth2.
# client_id = "clientid"
# client_secret = "secret"
# token_url = "https://indentityprovider/oauth2/v1/token"
# scopes = ["urn:opc:idm:__myscopes__"]
## HTTP Proxy support
# use_system_proxy = false
# http_proxy_url = ""
## Optional TLS Config
## Set to true/false to enforce TLS being enabled/disabled. If not set,
## enable TLS only if any of the other options are specified.
# tls_enable =
## Trusted root certificates for server
# tls_ca = "/path/to/cafile"
## Used for TLS client certificate authentication
# tls_cert = "/path/to/certfile"
## Used for TLS client certificate authentication
# tls_key = "/path/to/keyfile"
## Password for the key file if it is encrypted
# tls_key_pwd = ""
## Send the specified TLS server name via SNI
# tls_server_name = "kubernetes.example.com"
## Minimal TLS version to accept by the client
# tls_min_version = "TLS12"
## List of ciphers to accept, by default all secure ciphers will be accepted
## See https://pkg.go.dev/crypto/tls#pkg-constants for supported values.
## Use "all", "secure" and "insecure" to add all support ciphers, secure
## suites or insecure suites respectively.
# tls_cipher_suites = ["secure"]
## Renegotiation method, "never", "once" or "freely"
# tls_renegotiation_method = "never"
## Use TLS but skip chain & host verification
# insecure_skip_verify = false
## Optional Cookie authentication
# cookie_auth_url = "https://localhost/authMe"
# cookie_auth_method = "POST"
# cookie_auth_username = "username"
# cookie_auth_password = "pa$$word"
# cookie_auth_headers = { Content-Type = "application/json", X-MY-HEADER = "hello" }
# cookie_auth_body = '{"username": "user", "password": "pa$$word", "authenticate": "me"}'
## cookie_auth_renewal not set or set to "0" will auth once and never renew the cookie
# cookie_auth_renewal = "5m"
## Amount of time allowed to complete the HTTP request
# timeout = "5s"
## List of success status codes
# success_status_codes = [200]
## Data format to consume.
## Each data format has its own unique set of configuration options, read
## more about them here:
## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md
data_format = "json_v2"
[[inputs.http.json_v2]]
measurement_name = "memory_usage"
[[inputs.http.json_v2.object]]
path = ""
included_keys = ["mem_used"]
[[inputs.http.json_v2.object.fields]]
key = "mem_used"
type = "int"
#[[inputs.http.json_v2]]
# measurement_name = "memory_usage"
#
# [[inputs.http.json_v2.object]]
# path = ""
# included_keys = ["mem_used"]
#
# [[inputs.http.json_v2.object.fields]]
# key = "mem_used"
# type = "int"
## Array of glob pattern strings or booleans keys that should be added as string fields.
# json_string_fields = []
## Tag keys is an array of keys that should be added as tags. Matching keys
## are no longer saved as fields. Supports wildcard glob matching.
tag_keys = ["hostname","id","site","activity_status"]
## Name key is the key to use as the measurement name.
json_name_key = "executable"
## When strict is true and a JSON array is being parsed, all objects within the
## array must be valid
json_strict = true
#
# # Configuration for the Prometheus client to spawn
[[outputs.prometheus_client]]
# ## Address to listen on.
# ## ex:
# ## listen = ":9273"
# ## listen = "vsock://:9273"
listen = ":9275"
#
# ## Maximum duration before timing out read of the request
# # read_timeout = "10s"
# ## Maximum duration before timing out write of the response
# # write_timeout = "10s"
#
# ## Metric version controls the mapping from Prometheus metrics into Telegraf metrics.
# ## See "Metric Format Configuration" in plugins/inputs/prometheus/README.md for details.
# ## Valid options: 1, 2
metric_version = 2
#
# ## Use HTTP Basic Authentication.
basic_username = "Foo"
basic_password = "Bar"
#
# ## If set, the IP Ranges which are allowed to access metrics.
# ## ex: ip_range = ["192.168.0.0/24", "192.168.1.0/30"]
# # ip_range = []
#
# ## Path to publish the metrics on.
path = "/metrics"
#
# ## Expiration interval for each metric. 0 == no expiration
# # expiration_interval = "60s"
#
# ## Collectors to enable, valid entries are "gocollector" and "process".
# ## If unset, both are enabled.
collectors_exclude = ["gocollector", "process"]
#
# ## Send string metrics as Prometheus labels.
# ## Unless set to false all string metrics will be sent as labels.
string_as_label = true