mickem / nscp

NSClient++
http://nsclient.org
GNU General Public License v2.0
233 stars 91 forks source link

User profile disks .... log cluttering #753

Open s3ta opened 2 years ago

s3ta commented 2 years ago

Issue and Steps to Reproduce

We use nsclient++ on a bunch of servers, most working perfectly. Our Win-Admins decided to use the "user profile disk"-feature on an RDP-server. After a while nsclient++ log the following error messages: 2021-12-08 07:24:45: error:c:\source\master\modules\CheckSystem\pdh_thread.cpp:307: Failed to query performance counters: disk_queue_length_24 Failed to poll counter \VS0449\Physikalischer Datenträger(24)\Zeit (%): c0000bc6: Die Daten sind ungültig. about every 2s Furthermore we established a monitoring check watching the logfile size - so just ignoring is not possible, since we want to get notified if something's wrong (alias_nsclientlog = check_files "path=c:/Program Files/nsclient++/nsclient.log" "warn=size > 1M" "crit=size > 10M")

My assumption is, that a new disk with the next index for the counter is created every time a user is logging in with the "user profile disk"-feature - and they go away, when a users logs out (currently I see 0,1,2,3,4,5,6,7,8,9,10,11,12,18 as index) and nsclient++ complains correctly there's no 24.

I didn't configure counter checks on any disc > 2 - so I assume furthermore there is some "standard" mechanism reading all disks subsequently 0-maxIndex e.g. when checkSystem is enabled, which is the cause for the log entries

I can provide more details by request


[/settings/system/windows/counters/avg_queue_c]
counter=\234(0 C:)\1400
collection strategy=rrd
[/settings/system/windows/counters/avg_io_read_c]
counter=\234(0 C:)\214
collection strategy=rrd
[/settings/system/windows/counters/avg_io_write_c]
counter=\234(0 C:)\216
collection strategy=rrd

[/settings/system/windows/counters/avg_queue_d]
counter=\234(1 D:)\1400
collection strategy=rrd
[/settings/system/windows/counters/avg_io_read_d]
counter=\234(1 D:)\214
collection strategy=rrd
[/settings/system/windows/counters/avg_io_write_d]
counter=\234(1 D:)\216
collection strategy=rrd

[/settings/system/windows/counters/avg_queue_t]
counter=\234(2 T:)\1400
collection strategy=rrd
[/settings/system/windows/counters/avg_io_read_t]
counter=\234(2 T:)\214
collection strategy=rrd
[/settings/system/windows/counters/avg_io_write_t]
counter=\234(2 T:)\216
collection strategy=rrd

Expected Behavior

Log should stay clean since no checks are configured

Actual Behavior

Log fills up

Details

Additional Details

NSClient++ log:

2021-12-08 07:24:45: error:c:\source\master\modules\CheckSystem\pdh_thread.cpp:307: Failed to query performance counters: disk_queue_length_24 Failed to poll counter \\VS0449\Physikalischer Datenträger(24)\Zeit (%): c0000bc6: Die Daten sind ungültig.
about every 2s
jbqbo commented 2 years ago

Hello,

Have you found a solution for the problem? The log file grows fast with a line every 2 seconds

Thanks

s3ta commented 2 years ago

unfortunately not yet :(

jbqbo commented 2 years ago

For me the problem of logs is on windows server 2019 I don't have this problem with windows 2016 servers Maybe a performance counter problem with windows server 2019