Failed to add counter: PdhCollectQueryData failed:: 800007d5


#1

Hello guys,

Need your help please! I use Nagios 4.4.3 as a monitoring server and nsclient 0.5.2.41 for the client software . I would like to monitore the state of my hard disk which is located in a client machine ( Microsoft Windows Server 2016 Standard ).

When we take a look in nagios, we have the following error : Failed to add counter: PdhCollectQueryData failed: : 800007d5: Aucune donnée à renvoyer.

In nsclient.ini, the following codes are used :

############################################# …

alias_counter_disk_AvgWQL = CheckCounter “Counter:Disk_avg_write_queue=\Disque physique(_Total)\Longueur moyenne de file d’attente écriture disque” MaxWarn=5 MaxCrit=10

alias_counter_disk_AvgRQL = CheckCounter “Counter:Disk_avg_read_queue=\Disque physique(_Total)\Longueur moyenne de file d’attente lecture disque” MaxWarn=5 MaxCrit=10

########################################

Do you have an idea, please ? Thanks in advance !


#2

I use a similar command, but with the new check_pdh, which replaced checkcounter

-c check_pdh -a “counter=\PhysicalDisk(_Total)\Avg. Disk Queue Length” “counter=\PhysicalDisk(_Total)\Avg. Disk Read Queue Length” “counter=\PhysicalDisk(_Total)\Avg. Disk Write Queue Length”

(These are args passed to the command however not hard coded into the ini)

Although I’ve seen that error before and it was usually because the counters themselves were not working on the server - go to perfmon on the box and make sure its definitely graphing those stats locally


#3

When I take a look to perform, graphs work well with their stats, especially for Disque physique(_Total)\Longueur moyenne de file d’attente écriture disque and Disque physique(_Total)\Longueur moyenne de file d’attente lecture disque.

In addition, when I launch the following command (1) , the result is good ,I mean a real value is returned

(1) : Get-Counter -counter '\Disque physique(_Total)\Longueur moyenne de file d’‘attente écriture disque’

Your Idea is welcome !