1

I'm working on scollector and I want to have specific frequencies for different collector.

For example:

  • get info from disk usage every 5 minutes
  • info from memory every minute
  • iostat every 30 seconds
  • and so on...

Here is a part of the conf.toml I made:

FullHost = true
Freq = 60
DisableSelf = true

[[iostat]]
  Filter = "iostat"
  Freq = 30

[[memory]]
  Filter = "memory"
  Freq = 60

But I get some error

./scollector -conf="perso.toml" -p
2016/04/19 14:40:45 fatal: main.go:297: extra keys in perso.toml: [iostat iostat.Freq memory memory.Freq]

It seems that I cannot multiply the frequencies.

What should I do to get what I want?

Thank you all

Node One
  • 33
  • 1
  • 6
  • Ideally, a question will consist of a single issue you want and answer for, otherwise it may attract low quality answers. You should reduce this to a single "this is what I want, this is what I did, this is what I got" question. Follow-on questions can then be posed later. –  Apr 19 '16 at 15:02
  • Okay, thank you for the help. I shared my conf.toml, I got an error and I want to change the frequency in seconds for my different collectors. I don't see how to do it properly, if it is possible at all. – Node One Apr 19 '16 at 15:05
  • Please note that comments are not for adding edits to your question. You can re-edit the question any time to clarify or add information. –  Apr 19 '16 at 15:10

3 Answers3

0

According to scollector documentation, Freq is a global setting, so it's not possible to set different frequencies for each collector. The exception is for external collectors, which may be put in a folder named after the desired frequency (in seconds).

Vitor
  • 2,734
  • 29
  • 40
0

Freq is indeed global setting and interval is usually set to it. Although some collectors override interval to different values e.g. elasticsearch-indices runs every 15 minutes because there's a lot of data to pull.

To change it either

  • (best) hack scollector code to read and pass freq parameter to every collector
  • (second best) file a github issue
  • (last resort) you can just change intervals scollector code in specific collectors and recompile scollector
Dima Medvedev
  • 281
  • 4
  • 8
0

Well, we might found something. We create differents folders representing several Freq (0, 30, 60, 120...) and in each folders, we write external collectors we need.

'/etc/collectors/0',
'/etc/collectors/15',
'/etc/collectors/30',
'/etc/collectors/60',
'/etc/collectors/120',
'/etc/collectors/300',
'/etc/collectors/600'

In the conf.toml:

ColDir = "/etc/scollector/collectors"

If we want the internal collectors, we have to rewrite them :(

Node One
  • 33
  • 1
  • 6