Dez
Newbie
Karma: 0
Offline
Posts: 7
|
 |
« on: October 20, 2009, 03:34:15 AM » |
|
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 \Memory\Pages/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:\WINDOWS\system32. I even put a copy of it in C:\Program Files\pandora_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.
|
|
|
|
|
Logged
|
|
|
|
|
Dez
Newbie
Karma: 0
Offline
Posts: 7
|
 |
« Reply #1 on: October 20, 2009, 04:02:49 AM » |
|
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:\Windows\Temp\IMXJSNS1_Jetset_Production.19311.data 2009-10-20 00:00:08 Next execution on 60 seconds
|
|
|
|
|
Logged
|
|
|
|
|
|
|
 |
« Reply #2 on: October 20, 2009, 08:16:10 AM » |
|
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
|
|
|
|
|
Logged
|
-- See you in the other screen.
|
|
|
|
Dez
Newbie
Karma: 0
Offline
Posts: 7
|
 |
« Reply #3 on: October 20, 2009, 08:23:06 AM » |
|
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.
|
|
|
|
|
Logged
|
|
|
|
|
|
|
 |
« Reply #4 on: October 20, 2009, 08:26:50 AM » |
|
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 http://openideas.info/wiki , plus a lot of annexes and other (interesting) stuff.
|
|
|
|
|
Logged
|
-- See you in the other screen.
|
|
|
|
Dez
Newbie
Karma: 0
Offline
Posts: 7
|
 |
« Reply #5 on: October 20, 2009, 09:35:06 AM » |
|
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 \Memory\Available 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:
<module> <name>Processor_Time</name> <type>generic_data</type> <data>39806287500000</data> <description>Processor Total Precent Processor Time</description> </module>
Any ideas?
|
|
|
|
|
Logged
|
|
|
|
|
|
|
 |
« Reply #6 on: October 20, 2009, 09:48:35 AM » |
|
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 !
|
|
|
|
|
Logged
|
-- See you in the other screen.
|
|
|
|
Dez
Newbie
Karma: 0
Offline
Posts: 7
|
 |
« Reply #7 on: October 21, 2009, 06:34:50 AM » |
|
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
|
|
|
|
|
Logged
|
|
|
|
|
aoton
Jr. Member

Karma: 0
Offline
Posts: 13
|
 |
« Reply #8 on: December 09, 2009, 02:11:01 PM » |
|
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,
|
|
|
|
|
Logged
|
|
|
|
|
|
|
 |
« Reply #9 on: December 11, 2009, 11:11:11 AM » |
|
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.
|
|
|
|
|
Logged
|
-- See you in the other screen.
|
|
|
|
|