-
Notifications
You must be signed in to change notification settings - Fork 175
PerformanceManager helper maps wrong counter #21
Comments
I tried it with a different vCenter and was able to get stats from the 300 intervalId. It must be a server side config. irb(main):203:0> pm.retrieve_stats([hosts[0]], ['cpu.usagemhz'], {interval: '300', start_time: '2013-07-31 11:20:00AM'}).first[1][:metrics]
=> {"cpu.usagemhz"=>[2002, 2365, 2562, 2075, 2078, 2505, 2050, 2040, 2883, 2417, 1975, 2327, 2102, 2060, 2751, 2396, 2479, 2364, 2144, 2037, 2673, 2203, 1993, 2288, 2079, 2007, 2704, 2123, 3348, 2479, 2136, 2335, 3047, 2382, 2138, 2406, 2267, 2781, 3311, 2277, 2170, 2549, 2215, 2057, 2855, 2376, 2224, 2311, 2136, 2138, 2593, 2038, 2236, 2406, 2156, 2100, 2838, 2280, 2075, 2353, 2110, 2060, 2658, 2606, 2284, 2400, 2111, 2120, 2836, 2355, 2412, 2398]}
irb(main):204:0> pm.retrieve_stats([hosts[0]], ['cpu.usagemhz'], {interval: '300', start_time: '2013-07-31 11:20:00AM'}).first[1][:metrics]['cpu.usagemhz'].count
=> 72 one thing is it doesn't look like max_samples is working... debugging that now. |
There are different levels that govern which counter gets saved for how
|
Right, but that's not the problem here. The underlying problem here is calling the counter 'cpu.usagemhz' returns the first instance of cpu.usagemhz -- which is of rollup (none) - only at logging level 4. rollup 'average' counter is at level 1. The helper function doesn't allow you to specify. Check this doc And this gist I wrote on the issue: Thanks so much for replying! |
I also met the same problem. So I sent following PR: By this change, we can specify the target performance counter including RollupType like 'cpu.usagemhz.averate'. Unfortunately, it's not yet merged. It seems something verification or test is needed. But I don't know what can I do. Anyway, I created custom gem and am using it. It's looks working well. |
The 20s metrics return valid results, even for extended periods of time, but the 300s result sets are always empty:
Is there a requirement on the vCenter side to pull these metrics properly?
The host's storage charts (built on the 5 min historic data) populates properly:
http://imgur.com/Cd1NPLM
Thanks
The text was updated successfully, but these errors were encountered: