I have setup a basic Pandora 2.1 server installion & successfully installed the Windows Agent on a few Windows 2003 servers. I have also successfully added extra modules for monitoring extra CPU's & disk space on extra drives. However I have not been able to get the perfcounter module to work. As a simple test I just copy & pasted in the exact example from the wiki into my conf file: module_begin module_name perfcounter module_type generic_data module_perfcounter MemoryPages/sec module_end I then restarted the agent service, but the perfcounter module did not show up on the Pandora server (unlike the extra CPU & disk space modules which showed up straight away). The wiki obscurely mentions that pdh.dll must be installed. I have checked & it is present in C:WINDOWSsystem32. I even put a copy of it in C:Program Filespandora_agent. Still no change. So my question is, does anyone have this working. If so, then what extra steps do I have to do? Thanks.
Windows module_perfcounter - does anyone have it working?
Dez · 20 oct 2009, 6:34 · 10 mensajes · 53 visitas
- Inicio del debate
This is my debug log. It doesn't even mention the perfcounter module. 2009-10-20 00:00:03 Run begin 2009-10-20 00:00:03 Pandora_Windows_Service::checkConfig: Remote configuration disabled 2009-10-20 00:00:03 Run ServicioReg 2009-10-20 00:00:03 Run ReceivedPackets 2009-10-20 00:00:03 Executing: cmd.exe /c "netstat -s | grep "Packets Received" | tr -d " " | cut -f 2 -d "=" | tr -d "n"" 2009-10-20 00:00:04 Run Listen_Conn 2009-10-20 00:00:04 Executing: cmd.exe /c "netstat -an | grep LISTEN | wc -l | tr -d " "" 2009-10-20 00:00:04 Run FreeDiskC 2009-10-20 00:00:04 Run FreeDiskD 2009-10-20 00:00:04 Run CPUUse0 2009-10-20 00:00:08 Run FreeMemory 2009-10-20 00:00:08 Run Logevents 2009-10-20 00:00:08 ServicioReg getXML begin 2009-10-20 00:00:08 ServicioReg getXML end 2009-10-20 00:00:08 ReceivedPackets getXML begin 2009-10-20 00:00:08 ReceivedPackets getXML end 2009-10-20 00:00:08 Listen_Conn getXML begin 2009-10-20 00:00:08 Listen_Conn getXML end 2009-10-20 00:00:08 FreeDiskC getXML begin 2009-10-20 00:00:08 FreeDiskC getXML end 2009-10-20 00:00:08 FreeDiskD getXML begin 2009-10-20 00:00:08 FreeDiskD getXML end 2009-10-20 00:00:08 CPUUse0 getXML begin 2009-10-20 00:00:08 CPUUse0 getXML end 2009-10-20 00:00:08 FreeMemory getXML begin 2009-10-20 00:00:08 FreeMemory getXML end 2009-10-20 00:00:08 Logevents getXML begin 2009-10-20 00:00:08 Logevents getXML end 2009-10-20 00:00:08 Copying XML on C:WindowsTempIMXJSNS1_Jetset_Production.19311.data 2009-10-20 00:00:08 Next execution on 60 seconds
Perfcounter is for Pandora FMS 3.0 windows agent, not for 2.1, the good news is you can use the pandora fms agent 3.0 for windows in a 2.1 server setup. Just install the newest windows agent, is not released officially (the RC1 will be released today or tomorrow, just for you, follow this link: http://artica.es/downloads/Pandora FMS Windows agent v3.0 RC1-Setup.exe
Thats great. Thank you very much. Is there a v2.1 specific version of the Windows Agent documentation? I'm concerned that I might make this sort of mistake again.
Yep, but you should use the 3.0 version, is a HUGE step forward in Pandora. All documentation for all versions are on our wiki at (Link not available anymore) , plus a lot of annexes and other (interesting) stuff.
Ok, I have made some progress now. I have added a counter for available megabytes as follows: # Memory Available MBytes module_begin module_name MemAvailMBytes module_type generic_data module_description Memory Available MBytes module_perfcounter MemoryAvailable MBytes module_end This appears to be returning valid values. However I have also added one for processor time: # Get processor time from Performance Counter module_begin module_name Processor_Time module_type generic_data module_perfcounter Processor(_Total)% Processor Time module_end As far I know this should be returning values between 0 to 100. Instead I'm getting values like this: Processor_Time generic_data 39806287500000 Processor Total Precent Processor Time Any ideas?
Windows surprise you again with black magic?, don't worry :-) Perfcounters returns values with different scales, windows perfcounter "resize" them, applying a factor over received data, pandora could do the same using the postprocess value in the module definitioin, if you post process them using 0.0001 for example, you will divide it by 1000. Another problem could be that windows are reporting a global counter, so you need to define the module as a generic_data_inc type, not generic_data. I hope this help to fight against the black magic of Windows !
The data seems wrong no matter how I scale it. In this case I used the following WMI equivalent & it is returning correct data: module_begin module_name PercentProcessorTime module_type generic_data_string module_wmiquery select PercentProcessorTime from Win32_PerfFormattedData_PerfOS_Processor where name = '_Total' module_wmicolumn PercentProcessorTime module_end
Hello, I'm working with this module getting "differents" behaivours on virtual machines. With: module_begin module_name VM Processor Time (%) module_type generic_data_inc module_perfcounter VM Processor(_Total)% Processor Time module_end I have to add a Post process factor of 0.00001 This return a value near of 0 when the vm is not under load and near to 98 with cpuburn running, by example. But with: module_begin module_name Processor Time (%) module_type generic_data_inc module_perfcounter Processor(_Total)% Processor Time module_end Need a post process factor 0.00001 too but the returned values works from 98 witout load and 0 with load. I think that both counters must return a similar value, knows somebody why this behaivour? Regards,
Perfcounters are a depth mistery. WMI its usually much better, but in some applications you only have perfcounters, we add this feature for compatibility and to have more options, but for get CPU is much better the internal pandora module, for example.
Entra en tu cuenta para publicar.
