Histogram Backend |
Histogram BackendThe Histogram backend collects statistical information in arbitrarily many dimensions, rather than the one dimension typically used when gathering statistics. For example, a histogram that stores a list of IP addresses and strings might be used to represent the number of times clients on a network retrieved a particular URL. A different instance of a similarly structured histogram might store the number of times user-ids had logged into various systems within the network. Thus, two histograms with the same structure can be used to store completely different types of data. To clarify this concept, visualize a table of data. Each row of the table contains a count of how many times it has received a record that matches that exact row. The Histogram recorder keeps this count by looking up the records it receives in the table it keeps. For example, say you have two columns named "A" and "B". The Histogram recorder has no rows in its table when it receives a record that contains [ 1, 2 ]. It adds a row to the table and notes that it has seen that row 1 time. The results would be:
Now suppose it receives a record that contains [ 2, 2 ]. It adds another row:
Next it receives another record that contains [ 1, 2 ]. It finds that record in its table and adds one to the count. The results would be:
You can use this type of data for answering questions like "how much traffic is flowing between each pair of computers on my network", "how much UDP traffic", and so on. You can configure the Histogram to send an alert when it adds a new row that it has not previously recorded. In this case, this would be a new row never seen in the life of the system, not new for this interval. Histogram IntervalsThe histogram recorder records data for a period of time known as the "histogram interval". When the interval expires, it saves the current table in a data file and starts over with a blank table. This feature allows you to specify the time interval you want to monitor. For example, you could take a histogram over every half hour period of the day. The histograms are always aligned on a multiple of the histogram interval. For example, if the interval is 30 minutes, there will always be a histogram that covers exactly 10:00:00 to 10:29:59, regardless of when you started the system. It will even resume calculations if you stop it in the middle of a period and then restart it. However, stopping the histogram will cause your statistics to be incomplete because it stopped gathering data when it stopped running. |
|