influxdata / telegraf

Agent for collecting, processing, aggregating, and writing metrics, logs, and other arbitrary data.
https://influxdata.com/telegraf
MIT License
14.9k stars 5.6k forks source link

Need IIS Logparser Input plugin please #2392

Closed Kamalkp1978 closed 7 years ago

Kamalkp1978 commented 7 years ago

Directions

GitHub Issues are reserved for actionable bug reports and feature requests. General questions should be sent to the InfluxDB mailing list.

Before opening an issue, search for similar bug reports or feature requests on GitHub Issues. If no similar issue can be found, fill out either the "Bug Report" or the "Feature Request" section below. Erase the other section and everything on and above this line.

Please note, the quickest way to fix a bug is to open a Pull Request.

Bug report

Relevant telegraf.conf:

System info:

[Include Telegraf version, operating system name, and other relevant details]

Steps to reproduce:

  1. Need IIS logparser INput plugin for Telegraf
  2. Tried Custom grok parser in logparser input plugin but that does not work

Expected behavior:

Need to throw some error about why custom log parser not working

Actual behavior:

Does not throw any error, so difficult to understand the problem

Additional info:

Below is the custom Input Logparser I am using in Grafana 3.1.1 but it does not work

Stream and parse log file(s).

[[inputs.logparser]]

Log files to parse.

These accept standard unix glob matching rules, but with the addition of

** as a "super asterisk". ie:

/var/log/**.log ->recursively find all .log files in /var/log

/var/log//.log ->find all .log files with a parent dir in /var/log

/var/log/apache.log -> only tail the apache log file

files = ["C:/Temp/stats_access12.log"]

files = ["D:/CWS_Live_IIS_Logs/Server01/combined.log"]

Read file from beginning.

from_beginning = true

Parse logstash-style "grok" patterns:

Telegraf built-in parsing patterns: https://goo.gl/dkay10

[inputs.logparser.grok]

This is a list of patterns to check the given log file(s) for.

Note that adding patterns here increases processing time. The most

efficient configuration is to have one pattern per logparser.

Other common built-in patterns are:

%{COMMON_LOG_FORMAT} (plain apache & nginx access logs)

%{COMBINED_LOG_FORMAT} (access logs + referrer & agent)

patterns = ["%{COMMON_LOG_FORMAT}"]

patterns = ["%{COMBINED_LOG_FORMAT}"]

Name of the outputted measurement name.

 measurement = "CWS_access_log"

Full path(s) to custom pattern files.

custom_pattern_files = ["D:/CWS_Live_IIS_Logs/Server01/combined.log"]

Custom patterns can also be defined here. Put one pattern per line.

 custom_patterns = ["%{DATESTAMP:EventTime} %{WORD:sitename} %{HOSTNAME:computername} %{IP:hostip} %{URIPROTO:method} %{URIPATH:request} (?:%{NOTSPACE:queryparam}|-) %{NUMBER:port} (?:%{WORD:username}|-) %{IP:clientip} %{NOTSPACE:httpversion} %{NOTSPACE:user-agent} (?:%{NOTSPACE:cookie}|-) (?:%{NOTSPACE:referer}|-) (?:%{HOSTNAME:host}|-) %{NUMBER:status} %{NUMBER:sub-status} %{NUMBER:win32-status} %{NUMBER:bytes-received} %{NUMBER:bytes-sent} %{NUMBER:time-taken}"]

[Include gist of relevant config, logs, etc.]

Feature Request

Opening a feature request kicks off a discussion.

Proposal:

Current behavior:

Desired behavior:

Use case: [Why is this important (helps with prioritizing requests)]

sparrc commented 7 years ago

closing this because the feature request was not well described. Please feel free to reopen if you can:

  1. describe exactly what an IIS log is
  2. give examples of an IIS log
  3. describe why you need to logparse IIS logs
  4. describe why the provided pattern is not working, what else you've tried, error messages, etc.

please also make an effort to format your feature request properly using the template