Skip to content

Instantly share code, notes, and snippets.

@klen
Last active August 29, 2015 14:18
Show Gist options
  • Save klen/7eb5a41147718aedd3c9 to your computer and use it in GitHub Desktop.
Save klen/7eb5a41147718aedd3c9 to your computer and use it in GitHub Desktop.
[hekad]
base_dir = "/var/cache/hekad"
pid_file = "/var/run/hekad.pid"
maxprocs = 1
[UdpInput]
address = ":2003"
splitter = "TokenSplitter"
decoder = "StatsToFieldsDecoder"
[StatAccumInput]
ticker_interval = 10
emit_in_payload = true
[StatsToFieldsDecoder]
[WhisperOutput]
message_matcher = "TRUE"
base_path = "/tmp/whisper"
folder_perm = "755"
@klen
Copy link
Author

klen commented Apr 3, 2015

Udp packages:

collectd.stage_ticketscloud_org.cpu-0.cpu-idle 96.199905 1428087784
collectd.stage_ticketscloud_org.cpu-0.cpu-wait 0.000000 1428087784
collectd.stage_ticketscloud_org.cpu-0.cpu-interrupt 0.000000 1428087784
collectd.stage_ticketscloud_org.cpu-0.cpu-softirq 0.000000 1428087784
collectd.stage_ticketscloud_org.cpu-0.cpu-steal 0.400000 1428087784
collectd.stage_ticketscloud_org.cpu-1.cpu-user 98.299906 1428087784
collectd.stage_ticketscloud_org.cpu-1.cpu-nice 0.000000 1428087784
collectd.stage_ticketscloud_org.cpu-1.cpu-system 1.699998 1428087784
collectd.stage_ticketscloud_org.cpu-1.cpu-idle 0.000000 1428087784
collectd.stage_ticketscloud_org.cpu-1.cpu-wait 0.000000 1428087784
collectd.stage_ticketscloud_org.cpu-1.cpu-interrupt 0.000000 1428087784
collectd.stage_ticketscloud_org.cpu-1.cpu-softirq 0.000000 1428087784
collectd.stage_ticketscloud_org.cpu-1.cpu-steal 0.400000 1428087784
collectd.stage_ticketscloud_org.df-root.df_complex-free 20836352000.000000 1428087784
collectd.stage_ticketscloud_org.df-root.df_complex-reserved 1390182400.000000 1428087784
collectd.stage_ticketscloud_org.df-root.df_complex-used 9335799808.000000 1428087784
collectd.stage_ticketscloud_org.interface-eth0.if_octets.rx 231.602106 1428087784
collectd.stage_ticketscloud_org.interface-eth0.if_octets.tx 1549.514091 1428087784

collectd.stage_ticketscloud_org.interface-eth0.if_packets.rx 2.800025 1428087784
collectd.stage_ticketscloud_org.interface-eth0.if_packets.tx 2.900026 1428087784
collectd.stage_ticketscloud_org.interface-eth0.if_errors.rx 0.000000 1428087784
collectd.stage_ticketscloud_org.interface-eth0.if_errors.tx 0.000000 1428087784
collectd.stage_ticketscloud_org.load.load.shortterm 0.360000 1428087784
collectd.stage_ticketscloud_org.load.load.midterm 0.360000 1428087784
collectd.stage_ticketscloud_org.load.load.longterm 0.340000 1428087784
collectd.stage_ticketscloud_org.memory.memory-used 1284759552.000000 1428087784
collectd.stage_ticketscloud_org.memory.memory-buffered 255082496.000000 1428087784
collectd.stage_ticketscloud_org.memory.memory-cached 2238156800.000000 1428087784
collectd.stage_ticketscloud_org.memory.memory-free 365928448.000000 1428087784
collectd.stage_ticketscloud_org.tail-postfix.mail_counter-status-reject 0.000000 1428087784
collectd.stage_ticketscloud_org.tail-postfix.mail_counter-status-sent 0.000000 1428087784
collectd.stage_ticketscloud_org.disk-xvda1.disk_octets.read 0.000000 1428087784
collectd.stage_ticketscloud_org.disk-xvda1.disk_octets.write 23347.454668 1428087784
collectd.stage_ticketscloud_org.disk-xvda1.disk_ops.read 0.000000 1428087784
collectd.stage_ticketscloud_org.disk-xvda1.disk_ops.write 3.500038 1428087784

@rafrombrc
Copy link

Here's a config that I'm using, with which I'm able to see data being writting out to the whisper files:

[hekad]
maxprocs = 1

[UdpInput]
address = ":2003"
decoder = "StatsToFieldsDecoder"

[StatsdInput]
address = ":8125"

[StatAccumInput]
ticker_interval = 10
emit_in_payload = true

[StatsToFieldsDecoder]

[RstEncoder]

[WhisperOutput]
message_matcher = "TRUE"
base_path = "/tmp/graphite/storage/whisper"
folder_perm = "755"

[LogOutput]
message_matcher = "TRUE"
encoder = "RstEncoder"

@rafrombrc
Copy link

I did this by taking one of your sets of stats from up above and pasting them into a file called stats.txt. Then I did a find/replace of the timestamps at the end of each line with the current timestamp, saved it, and ran cat stats.txt | nc -u 127.0.0.1 2003. I can see the message show up in my LogOutput, and using whisper-dump cpu-idle.wsp I can see, among all of the zeros, the following line:

1142: 1428087780, 96.19990500000000110958353616297245

Can you try doing the exact same thing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment