graphite-dev team mailing list archive
-
graphite-dev team
-
Mailing list archive
-
Message #04332
[Question #234874]: random metrics not showing up in the graphite browser or whisper storage
New question #234874 on Graphite:
https://answers.launchpad.net/graphite/+question/234874
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_1min_for_1day]
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::INET->new(
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.fsact00.AAHL-SHARE.used
share.hnas.fsact00.AAHL-SHARE.files
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.
--
You received this question notification because you are a member of
graphite-dev, which is an answer contact for Graphite.