Telegraf is not restarting once i added input custom metric

I added custom metric in inputs conf and restarted the service, it is failing at statd. outputs file is already configured

Can you put the full error output when ran with --test and --debug?


This is the error, I have already added Prometheus output file. Still i am not able to make it work.

@Suresh
Welcome! Can you please share the input section of your config?
And @npm_engineer thanks for your help!

[[inputs.win_services]]
service = [“"] # Use "” to monitor all services or specify specific services
measurement = “win_services”

@Suresh Sorry I should have asked for all of the config.

I am not able to upload config file here. This is the input config which i am using it.

[inputs]

These are the recommended method of monitoring system metrics on windows,

as the regular system plugins (inputs.cpu, inputs.mem, etc.) rely on WMI,

which utilize more system resources.

See more configuration examples at:

telegraf/plugins/inputs/win_perf_counters at master · influxdata/telegraf · GitHub

[[inputs.win_perf_counters]]
[[inputs.win_perf_counters.object]]
# Processor usage, alternative to native, reports on a per core.
ObjectName = “Processor”
Instances = [“"]
Counters = [
“% Idle Time”,
“% Interrupt Time”,
“% Privileged Time”,
“% User Time”,
“% Processor Time”,
“% DPC Time”,
]
Measurement = “win_cpu”
# Set to true to include _Total instance when querying for all (
).
IncludeTotal=true
[[inputs.win_perf_counters.object]]
# Disk times and queues
ObjectName = “LogicalDisk”
Instances = [”"]
Counters = [
“% Idle Time”,
“% Disk Time”,
“% Disk Read Time”,
“% Disk Write Time”,
“Current Disk Queue Length”,
“% Free Space”,
“Free Megabytes”,
]
Measurement = “win_disk”
# Set to true to include _Total instance when querying for all (
).
#IncludeTotal=false
[[inputs.win_perf_counters.object]]
ObjectName = “PhysicalDisk”
Instances = [““]
Counters = [
“Disk Read Bytes/sec”,
“Disk Write Bytes/sec”,
“Current Disk Queue Length”,
“Disk Reads/sec”,
“Disk Writes/sec”,
“% Disk Time”,
“% Disk Read Time”,
“% Disk Write Time”,
“Avg. Disk sec/read”,
“Avg. Disk sec/write”,
“Avg. Disk sec/Transfer”,
]
Measurement = “win_diskio”
IncludeTotal=true
[[inputs.win_perf_counters.object]]
ObjectName = “Network Interface”
Instances = [”
”]
Counters = [
“Bytes Received/sec”,
“Bytes Sent/sec”,
“Packets Received/sec”,
“Packets Sent/sec”,
“Packets Received Discarded”,
“Packets Outbound Discarded”,
“Packets Received Errors”,
“Packets Outbound Errors”,
]
Measurement = “win_net”
[[inputs.win_perf_counters.object]]
ObjectName = “System”
Counters = [
“Context Switches/sec”,
“System Calls/sec”,
“Processor Queue Length”,
“System Up Time”,
]
Instances = [“------”]
Measurement = “win_system”
# Set to true to include _Total instance when querying for all ().
#IncludeTotal=false
[[inputs.win_perf_counters.object]]
# Example query where the Instance portion must be removed to get data back,
# such as from the Memory object.
ObjectName = “Memory”
Counters = [
“Available Bytes”,
“Cache Faults/sec”,
“Demand Zero Faults/sec”,
“Page Faults/sec”,
“Pages/sec”,
“Transition Faults/sec”,
“Pool Nonpaged Bytes”,
“Pool Paged Bytes”,
“Standby Cache Reserve Bytes”,
“Standby Cache Normal Priority Bytes”,
“Standby Cache Core Bytes”,
]
# Use 6 x - to remove the Instance bit from the query.
Instances = [“------”]
Measurement = “win_mem”
# Set to true to include _Total instance when querying for all (
).
#IncludeTotal=false
[[inputs.win_perf_counters.object]]
# Example query where the Instance portion must be removed to get data back,
# such as from the Paging File object.
ObjectName = “Paging File”
Counters = [
“% Usage”,
]
Instances = [“_Total”]
Measurement = “win_swap”
[[inputs.win_perf_counters.object]]
ObjectName = “Network Interface”
Instances = [“*”]
Counters = [
“Bytes Sent/sec”,
“Bytes Received/sec”,
“Packets Sent/sec”,
“Packets Received/sec”,
“Packets Received Discarded”,
“Packets Received Errors”,
“Packets Outbound Discarded”,
“Packets Outbound Errors”,
]

I am pretty confused about this, are you sure that there isn’t more than one conf file and you are just calling the wrong one? What telegraf command are you running (it’s cut out of your screenshot)? Your screenshot also shows that it startup up inputs.statsd and stopped, however, the input file you just pasted after that doesn’t even have inputs.statsd in it?