Add metricbeat iis module#15059
Conversation
|
@jsoriano , I have touched on all the feedback, let me know if I miss anything |
jsoriano
left a comment
There was a problem hiding this comment.
Thanks! Some more comments on the latest changes.
| } | ||
|
|
||
| // getw3wpProceses func retrieves the running w3wp process ids | ||
| // getw3wpProceses func retrieves the running w3wp process ids. A worker process is a windows process (w3wp.exe) which runs Web applications, and is responsible for handling requests sent to a Web Server for a specific application pool. |
|
|
||
| func init() { | ||
| mb.Registry.MustAddMetricSet("windows", "perfmon", New) | ||
| mb.Registry.MustAddMetricSet("windows", metricsetName, New) |
There was a problem hiding this comment.
I am thinking now that as these metricsets don't need a host because they only query perfmon, we could add this:
| mb.Registry.MustAddMetricSet("windows", metricsetName, New) | |
| mb.Registry.MustAddMetricSet("windows", metricsetName, New, | |
| mb.WithHostParser(parse.EmptyHostParser), | |
| ) |
| if err != nil { | ||
| return nil, err | ||
| } | ||
| } |
There was a problem hiding this comment.
Oh ok, I would prefer if we can make it more explicit, like with an additional internal flag in the metricset.
Could it happen that we create another metricset based on perfmon where the instance label is also mandatory?
| } | ||
| var events []mb.Event | ||
| // GroupAllCountersTo config option will only apply to the webserver metricset, where counters for all instances are aggregated | ||
| if metricsetName != metricset && re.config.GroupAllCountersTo != "" { |
There was a problem hiding this comment.
Similarly here, I would prefer to don't depend on the metricset name for certain features, I would prefer this to be more explicit.
Also this generic metricset shouldn't have something specific for the webserver metricset (or any other metricset) if possible.
| assert.NotNil(t, reader.Query.Handle) | ||
| assert.NotNil(t, reader.Query.Counters) | ||
| assert.Zero(t, len(reader.Query.Counters)) | ||
| defer reader.close() |
There was a problem hiding this comment.
This comment is unaddressed (not so important in any case).
sorantis
left a comment
There was a problem hiding this comment.
Looks good. Suggested more metrics for the module.
| measurement_label: total_connection_attempts | ||
| query: '\Web Service(*)\Total Connection Attempts (all instances)' | ||
| - instance_label: 'name' | ||
| measurement_label: total_get_requests |
There was a problem hiding this comment.
@narph I can see total_get_requests, total_post_requests, total_delete_requests.
Can we also pull total_put_requests, total_head_requests, total_trace_requests, total_options_requests
There was a problem hiding this comment.
\Web Service(*)\Total PUT Requests
\Web Service(*)\PUT Requests/sec
\Web Service(*)\Total Head Requests
\Web Service(*)\Head Requests/sec
\Web Service(*)\Options Requests/sec
\Web Service(*)\Total Options Requests
\Web Service(*)\Other Request Methods/sec
\Web Service(*)\Total Other Request Methods
\Web Service(*)\Total Trace Requests
\Web Service(*)\Trace Requests/sec
\Web Service(*)\Total Unlock Requests
\Web Service(*)\Unlock Requests/sec
| query: '\Web Service(_Total)\Bytes Received/sec' | ||
| - instance_label: '' | ||
| measurement_label: network.current_connections | ||
| query: 'Web Service(_Total)\Current Connections' |
There was a problem hiding this comment.
Would be great to also have
Web Service(*)Current Anonymous Users
Web Service(*)Current NonAnonymous Users
Web Service(*)Total Anonymous Users
Web Service(*)Anonymous Users/sec
Web Service(*)Total NonAnonymous Users
| query: '\Web Service(_Total)\Delete Requests/sec' | ||
| - instance_label: '' | ||
| measurement_label: network.service_uptime | ||
| query: '\Web Service(_Total)\Service Uptime' |
There was a problem hiding this comment.
We can also add error counters:
Web Service(*)Total Not Found Errors
Web Service(*)Not Found Errors/sec
Web Service(*)Total Locked Errors
Web Service(*)Locked Errors/sec
* created iis module * work in progress * iis changes * add iis module * light * work on build * work on build * build * fmt update * temp * work on website * temp * temp * manifest changes * temp * temp * work on wp * adding application pool metricset * wmi option * test * work on apppool * work on app pool * work on website metricset * work on tests * Work on website * work on website * work on website * perfmon fix * work on websie * update config * feedback * work on feedback * temp * ecs * temp * add counters (cherry picked from commit 8be4589)
kaiyan-sheng
left a comment
There was a problem hiding this comment.
Missing changelog here?
* Add metricbeat iis module (#15059) * created iis module * work in progress * iis changes * add iis module * light * work on build * work on build * build * fmt update * temp * work on website * temp * temp * manifest changes * temp * temp * work on wp * adding application pool metricset * wmi option * test * work on apppool * work on app pool * work on website metricset * work on tests * Work on website * work on website * work on website * perfmon fix * work on websie * update config * feedback * work on feedback * temp * ecs * temp * add counters (cherry picked from commit 8be4589) * fix file
Related issue #13072
Reusing the pdh query (in perfmon) to retrieve the iis specific counters.
Initial implementation contains 2 metricsets: