PDA

View Full Version : PerfCounter on NIC with multiple interfaces


SparHawk
19-03-2005, 00:25
Need help with the following PerfCounter,

I have a single network card with 2x RJ45 ports, the performance counters looks like this.

PerfCounter= NetIn1,"\Network Interface(Intel Pro Server Adapter)\Bytes Received/sec",60
PerfCounter= NetOut1,"\Network Interface(Intel Pro Server Adapter)\Bytes Sent/sec",60

PerfCounter= NetIn2,"\Network Interface(Intel Pro Server Adapter#1)\Bytes Received/sec",60
PerfCounter= NetOut2,"\Network Interface(Intel Pro Server Adapter#1)\Bytes Sent/sec",60

The problem seems to be where the "#" sign is located, is there a way around this.

Need help on this urgently PLEASE!

Thanks

SparHawk

dm0nkz
13-05-2005, 05:35
Would like to know if anyone has found the solution for this?

Im encountering the same problem..

Thanks and God bless!

dm0nkz

SparHawk
13-06-2005, 21:31
Alexei,

Do you have any suggestions, regarding the "Quote".

The performance counter in windows named the 2nd Network Card as Intel Pro Server Adapter#1, it looks like the client has an issue with the #, is there an alternative way around "Windows Naming" convention for this? (eg MAC address...)

Need help with the following PerfCounter,

I have a dual network card with 2x Network interfaces, the performance counters looks like this for windows.

PerfCounter= NetIn1,"\Network Interface(Intel Pro Server Adapter)\Bytes Received/sec",60
PerfCounter= NetOut1,"\Network Interface(Intel Pro Server Adapter)\Bytes Sent/sec",60

PerfCounter= NetIn2,"\Network Interface(Intel Pro Server Adapter#1)\Bytes Received/sec",60
PerfCounter= NetOut2,"\Network Interface(Intel Pro Server Adapter#1)\Bytes Sent/sec",60


I would like to monitor both interfaces, would it be possible?

SparHawk :confused: :confused:

Rudolf
25-07-2005, 17:17
Hi,

I wanted to ask if you found the solution and if it works now. I try to monitor a network card with the name "3Com EtherLink 10/100 PCI TX NIC (3C905B-TX)" and I think the "/" is also causing problems.

holly
26-07-2005, 22:25
Show this post

http://www.zabbix.com/forum/showpost.php?p=3517&postcount=7

SparHawk
04-08-2005, 10:22
Holly,


thanks for the post but it still does NOT work.

Hardware:
Intel 8255x-based PCI Ethernet Adapter (10/100)
Intel 8255x-based PCI Ethernet Adapter (10/100) #2

Windows Performance Counter:
\Network Interface(Intel[R] PRO Adapter#1)\Bytes Total/sec
\Network Interface(Intel[R] PRO Adapter)\Bytes Total/sec

zabbix_agentd Configuration:
PerfCounter = NetTotal,"\Network Interface(Intel[R] PRO Adapter)\Bytes Total/sec",60
PerfCounter = NetTotal2,"\Network Interface(Intel[R] PRO Adapter _1)\Bytes Total/sec",60

Tried:
PerfCounter = NetTotal2,"\Network Interface(Intel[R] PRO Adapter#1)\Bytes Total/sec",60
PerfCounter = NetTotal2,"\Network Interface(Intel[R] PRO Adapter 1)\Bytes Total/sec",60
PerfCounter = NetTotal2,"\Network Interface(Intel[R] PRO Adapter _2)\Bytes Total/sec",60
PerfCounter = NetTotal2,"\Network Interface(Intel[R] PRO Adapter 2)\Bytes Total/sec",60

Error if you run zabbixw32 check-config with the following configuration:
PerfCounter = NetTotal2,"\Network Interface(Intel[R] PRO Adapter#1)\Bytes Total/sec",60

erald
08-08-2005, 23:47
I have exactly the same problem
Using one port of two installed in my system and using:

PerfCounter= NetIn5,"\Network Interface(Intel[R]PRO_1000 MT Network Adapter _2)\Bytes Received/sec",5
or
PerfCounter= NetIn5,"\Network Interface(Intel[R]PRO/1000 MT Network Adapter)\Bytes Received/sec",5
or
PerfCounter= NetIn5,"\Network Interface(Intel[R]PRO_1000 MT Network Adapter)\Bytes Received/sec",5
or
PerfCounter= NetIn5,"\Network Interface(Intel(R)PRO_1000 MT Network Adapter _2)\Bytes Received/sec",5


etc. tried most settings and almost all of them return 0 (some are not supported) so playing with the (R), [R] PRO/, PRO_, #2, _2, nothing etc.

The performance logger in windows uses
Network Interface(Intel(R)PRO/1000 MT Network Adapter)\Bytes Received/sec

and gives me results.

Anyone????

Erald

mpeide
09-08-2005, 18:01
This might be useful for determing adapter names. This a code snippet that I have for querying WMI for the name of adapters on a WinXP or WS2003.

I'm actually using this snippet as a function in vbs script I use to create the zabbix_agentd.conf on the fly for my windows clients. It's still in development but I'm querying a MSSQL table based on host template and automatically creating file with correct user parameters and downloads additional vbs s cripts from web server(I'll post later after I finish a couple additional features).

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
set objRefresher = CreateObject("WbemScripting.SWbemRefresher")
Set colItems = objRefresher.AddEnum _
(objWMIService, "Win32_PerfFormattedData_TCPIP_NetworkInterface").objectSet
objRefresher.Refresh

For Each objItem in colItems
If objItem.Name <> "MS TCP Loopback interface" then
wscript.echo (objItem.Name)
end if

Next


Later,

Matt

befortin
20-06-2006, 19:54
I got the same issue as some guys on this thread. I'm able to monitor a bunch of network interfaces, but when it comes to an interface which is named, in the Performance Monitor, "Network Interface(Broadcom NetXtreme Gigabit Ethernet Driver#1", I'm not able to monitor it. I'm able to monitor another interface on the same server ("Network Interface(Broadcom NetXtreme Gigabit Ethernet Driver"), so I guess that the "#" character is the cause of this issue.

Is there any solution for this issue?

pdwalker
10-07-2006, 07:08
PerfCounter=Net1In ,"\Network Interface(Intel[R] PRO_1000 XT Network Connection)\Bytes Received/sec",60
PerfCounter=Net2In ,"\Network Interface(Intel[R] PRO_1000 XT Network Connection#1)\Bytes Received/sec",60

The first works, the second counts is considered a configuration error.

My guess is that the parsing code for the configuration file handling considers the '#' to be the start of a comment and then stops processing the rest of the line resulting in an error.

The proper behaviour should be to recognize that it is contained within quoted text and that it should continue processing the line.

- Paul

pdwalker
10-07-2006, 07:45
[edit: it might not be working.. will reboot the computer and report back]

[edit2: nope, spoke too soon. not working. will continue to investigate. for now, it doesn't work]

PerfCounter=Net1In ,"\Network Interface(Intel[R] PRO_1000 XT Network Connection)\Bytes Received/sec",60
PerfCounter=Net2In ,"\Network Interface(Intel[R] PRO_1000 XT Network Connection#1)\Bytes Received/sec",60

Warning: This fix could possibly destory your windows machine.

I searched the registry and found a key that contained the string "Intel[R] PRO_1000 XT Network Connection"

I can see that two adapters were defined with the same string. Windows then appends the #1 onto the one of the strings to differentiate the two. What I did was to edit of them in the registry to be slightly different from the first.

The end result is that I can now access both network ports for monitoring.

PerfCounter=Net1In ,"\Network Interface(Intel[R] PRO_1000 XT Network Connection)\Bytes Received/sec",60
PerfCounter=Net1Out,"\Network Interface(Intel[R] PRO_1000 XT Network Connection)\Bytes Sent/sec",60
PerfCounter=Net2In ,"\Network Interface(Intel[R] PRO_1000 XT Network Connection2)\Bytes Received/sec",60
PerfCounter=Net2Out,"\Network Interface(Intel[R] PRO_1000 XT Network Connection2)\Bytes Sent/sec",60

A couple of more points:

a) If you do fiddle with your registry, make sure you export the key before you change it in case you need to back out of your changes.

b) The change in my case didnt require a reboot after altering it.

c) On three different computers, I found the key in three slightly different places. Good luck finding yours.

- Paul

dminstrel
28-07-2006, 17:15
Was this the FriendlyName string in the registry?

Did anybody find another solution?

Thanks,

Rudolf
20-10-2006, 16:01
Hello,
Anyone has more news about that problem? I don't really want to modify the registry on our domain controller. (Actually I get an error "Cannot edit FriendlyName: Error writing the value(s) new contents.").
My network card is "HP NC373i Multifunction Gigabit Server Adapter #2".

claytronic
12-03-2007, 19:59
Hello,

I've been searching around the forum for any posted resolutions for the special characters in the network device name. In my case I'm tracking to monitor the Broadcom NICs in our Dell servers.

Broadcom BCM5708C NetXtreme II GigE (NDIS VBD Client) #1
Broadcom BCM5708C NetXtreme II GigE (NDIS VBD Client) #2

Based on the strings I see in perfmon I've tried the following configuration without success.


#Network
PerfCounter= NetIn_1, "\Network Interface(Broadcom BCM5708C NetXtreme II GigE [NDIS VBD Client] _1)\Bytes Received/sec",60
PerfCounter= NetOut_1, "\Network Interface(Broadcom BCM5708C NetXtreme II GigE [NDIS VBD Client] _1)\Bytes Sent/sec",60
PerfCounter= NetIn_2, "\Network Interface(Broadcom BCM5708C NetXtreme II GigE [NDIS VBD Client] _2)\Bytes Received/sec",60
PerfCounter= NetOut_2, "\Network Interface(Broadcom BCM5708C NetXtreme II GigE [NDIS VBD Client] _2)\Bytes Sent/sec",60



Thanks,
Clayton

claytronic
12-03-2007, 20:30
All,

I solved this just a few minutes ago. I used the previously posted VBscript to identify a missing whitespace.

The zabbix_agentd.conf configuration below is working on our Dell 2950 machines.


#Network
PerfCounter= NetIn_1, "\Network Interface(Broadcom BCM5708C NetXtreme II GigE [NDIS VBD Client])\Bytes Received/sec",60
PerfCounter= NetOut_1, "\Network Interface(Broadcom BCM5708C NetXtreme II GigE [NDIS VBD Client])\Bytes Sent/sec",60
PerfCounter= NetIn_2, "\Network Interface(Broadcom BCM5708C NetXtreme II GigE [NDIS VBD Client] _2)\Bytes Received/sec",60
PerfCounter= NetOut_2, "\Network Interface(Broadcom BCM5708C NetXtreme II GigE [NDIS VBD Client] _2)\Bytes Sent/sec",60


- Clayton

Florin
22-03-2007, 16:56
I'm not having any luck finding a solution for this particular issue. Relevant except from my zabbix_agentd.conf:

PerfCounter=MSSQLLoad1, "\Process(sqlservr)\% Processor Time",5
perfCounter=MSSQLLoad2, "\Process(sqlservr#1)\% Processor Time",5

zabbixw32 test calls this a configuration error, but according to perfmon sqlservr#1 is in fact the proper name for the second instance of SQL Server that is running on that server.

Anyone know another way to address multiple instances of processes?

claytronic
22-03-2007, 22:31
Hi Florin,

Have your tried:
perfCounter=MSSQLLoad2, "\Process(sqlservr_1)\% Processor Time",5

I'm not sure if that will work but I did have the same "#" issue when I first tried to setup the perfCounter for the second Broadcom NIC on our Dell servers.

Hope this works for you.

- Clayton

skullone
23-03-2007, 01:29
Hello,

I've been searching around the forum for any posted resolutions for the special characters in the network device name. In my case I'm tracking to monitor the Broadcom NICs in our Dell servers.

Broadcom BCM5708C NetXtreme II GigE (NDIS VBD Client) #1
Broadcom BCM5708C NetXtreme II GigE (NDIS VBD Client) #2

Based on the strings I see in perfmon I've tried the following configuration without success.


#Network
PerfCounter= NetIn_1, "\Network Interface(Broadcom BCM5708C NetXtreme II GigE [NDIS VBD Client] _1)\Bytes Received/sec",60
PerfCounter= NetOut_1, "\Network Interface(Broadcom BCM5708C NetXtreme II GigE [NDIS VBD Client] _1)\Bytes Sent/sec",60
PerfCounter= NetIn_2, "\Network Interface(Broadcom BCM5708C NetXtreme II GigE [NDIS VBD Client] _2)\Bytes Received/sec",60
PerfCounter= NetOut_2, "\Network Interface(Broadcom BCM5708C NetXtreme II GigE [NDIS VBD Client] _2)\Bytes Sent/sec",60



Thanks,
Clayton


Claytronic;
I've got a similar configuration, with those same Broadcom network cards.
I'm having trouble getting any PerfCounter with a / (forward slash) or % sign in it to work, including the NIC counters.

Can you paste your entire agentd.conf and a snippet of an Item in the frontend ?

Florin
23-03-2007, 09:19
Hi Florin,

Have your tried:
perfCounter=MSSQLLoad2, "\Process(sqlservr_1)\% Processor Time",5

I'm not sure if that will work but I did have the same "#" issue when I first tried to setup the perfCounter for the second Broadcom NIC on our Dell servers.

Hope this works for you.

- Clayton

Hi Clayton,

Thanks a lot for your prompt response. I tried using sqlservr_1, and although that does stop Zabbix agent from flagging it as a configuration error, the perfcounter just returns 0 all the time. But perfmon shows sqlservr#1 load bouncing all over the place.

Anyone know another way to address such multiple instances of processes? Or perhaps if a newer version of the zabbix agent might parse this differently?

rajan.s.ravi
23-03-2007, 10:30
Hi,

If you are using windows, then include a space between % and Processor

PerfCounter=Processor[Time],"\Processor(_Total)\% Processor Time",5 (note the space between % & Processor.

Initially i had used %Processor Time and it used to return 0 value. But now it works fine.

Hope this helps

Florin
26-03-2007, 14:54
Thanks Rajan, but that's not the issue I'm seeing. The problem is that any statement containing a # anywhere is flagged as an error. Anyone?

rajan.s.ravi
26-03-2007, 16:32
Any luck trying (sqlserver _1), just try to see if it works.

claytronic
13-04-2007, 03:01
Claytronic;
I've got a similar configuration, with those same Broadcom network cards.
I'm having trouble getting any PerfCounter with a / (forward slash) or % sign in it to work, including the NIC counters.

Can you paste your entire agentd.conf and a snippet of an Item in the frontend ?

Here you go skullone. Last week I enabled the Broadcom adapter teaming features. I've only commented out the originals.

These items are part of my Windows_t template.

Item 'Windows_t:NetIn_1'
Item 'Windows_t:NetOut_1'


############ GENERAL PARAMETERS #################

# List of comma delimited IP addresses (or hostnames) of ZABBIX servers.
# No spaces allowed. First entry is used for sending active checks.
# Note that hostnames must resolve hostname->IP address and
# IP address->hostname.

Server=x.x.x.x

# Server port for sending active checks

#ServerPort=10051

# Unique hostname. Required for active checks.

Hostname=localhost

# Listen port. Default is 10050

#ListenPort=10050

# IP address to bind agent
# If missing, bind to all available IPs

#ListenIP=127.0.0.1

# Number of pre-forked instances of zabbix_agentd.
# Default value is 5
# This parameter must be between 1 and 16

StartAgents=5

# How often refresh list of active checks. 2 minutes by default.

#RefreshActiveChecks=120

# Disable active checks. The agent will work in passive mode listening server.

#DisableActive=1

# Enable remote commands for ZABBIX agent. By default remote commands disabled.

#EnableRemoteCommands=1

# Specifies debug level
# 0 - debug is not created
# 1 - critical information
# 2 - error information
# 3 - warnings (default)
# 4 - for debugging (produces lots of information)

DebugLevel=3

# Name of PID file

PidFile=/var/tmp/zabbix_agentd.pid

# Name of log file.
# If not set, syslog will be used

LogFile=c:\Zabbix\zabbix_agentd.log

# Spend no more than Timeout seconds on processing
# Must be between 1 and 30

Timeout=3

####### USER-DEFINED MONITORED PARAMETERS #######
# Format: UserParameter=<key>,<shell command>
# Note that shell command must not return empty string or EOL only

####### Local Checks #######
UserParameter = localPing ,C:\Zabbix\pingTest.exe $1

####### Network #######
#PerfCounter= NetIn_1, "\Network Interface(Broadcom BCM5708C NetXtreme II GigE [NDIS VBD Client])\Bytes Received/sec",60
#PerfCounter= NetOut_1, "\Network Interface(Broadcom BCM5708C NetXtreme II GigE [NDIS VBD Client])\Bytes Sent/sec",60
#PerfCounter= NetIn_2, "\Network Interface(Broadcom BCM5708C NetXtreme II GigE [NDIS VBD Client] _2)\Bytes Received/sec",60
#PerfCounter= NetOut_2, "\Network Interface(Broadcom BCM5708C NetXtreme II GigE [NDIS VBD Client] _2)\Bytes Sent/sec",60
PerfCounter= NetIn_1, "\Network Interface(BASP Virtual Adapter)\Bytes Received/sec",60
PerfCounter= NetOut_1, "\Network Interface(BASP Virtual Adapter)\Bytes Sent/sec",60

Florin
17-04-2007, 09:13
Any luck trying (sqlserver _1), just try to see if it works.

I tried it, but no luck. I'm reading that it does seem to work for people with multiple NICs, but for statements like:

perfCounter=MSSQLLoad2, "\Process(sqlservr#1)\% Processor Time",5

neither
perfCounter=MSSQLLoad2, "\Process(sqlservr _1)\% Processor Time",5
nor
perfCounter=MSSQLLoad2, "\Process(sqlservr_1)\% Processor Time",5

are a solution.

So I'm still not able to monitor any process that isn't the first instance of that process :(

I wish the agents wouldn't parse the '#' unless it was at the start of a line..

claytronic
17-04-2007, 15:57
Have you tried the .Net compile of the Agent? It has a UI that may allow you to select the different processes you wish to monitor.

--
Clayton