random metrics not showing up in the graphite browser or whisper storage
I am trying to keep track of the capacity usage as well as the number of files in each of the file shares I manage.
I have setup graphite with the following storage schema:
--------------
[carbon]
pattern = ^carbon\.
retentions = 60:90d
[default_
pattern = .*
retentions = 60s:1d
[hnas_stuff]
pattern = ^share\.hnas\.
retentions = 1d:3650d
---------------
I then have some perl code that creates connects to the carbon server via:
------
my $sock = IO::Socket:
PeerAddr => $carbon_server,
PeerPort => 2003,
Proto => 'tcp'
)
----
I build up the stats in a hash and then iterate over the hash:
$sock->send("$key " . $stats->{$key}. " $time\n") ;
so each share has 2 keys. The keys look like:
share.hnas.
share.hnas.
My problem is that it is almost random as to which shares actually end up with 2 metrics in whisper. The number of shares that end up with all the metrics increase if I sleep for a second between socket send() calls. Some shares do not get any metrics at all.
I have been removing the whisper directory and re-running the script (with no sleep) and it seems to be creating exactly 49 files each run. with a one second sleep I get 139 files ( but I should get 160)
What am I doing wrong? I would really appreciate any help with this.
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- Graphite Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Ahmed EL Zein for more information if necessary.