Taylor
Taylor

Reputation: 540

Graphing the number of elements down based on timestamps start/end

I am trying to graph alarm counts in Python to give some sort of display to give an idea of the peak amount of network elements down between two timespans. The way that our alarms report handles it is in CSV like this:

Name,Alarm Start,Alarm Clear
NE1,15:42 08/09/11,15:56 08/09/11
NE2,15:42 08/09/11,15:57 08/09/11
NE3,15:42 08/09/11,16:31 08/09/11
NE4,15:42 08/09/11,15:59 08/09/11

I am trying to graph the start and end between those two points and how many NE's were down during that time, including the maximum number and when it went under or over a certain count. An example is below:

15:42 08/09/11 - 4 Down
15:56 08/09/11 - 3 Down
etc.

Any advice where to start on this would be great. Thanks in advance, you guys and gals have been a big help in the past.

Upvotes: 1

Views: 89

Answers (1)

carlpett
carlpett

Reputation: 12613

I'd start by parsing your indata to a map indexed by dates with counts as values. Just increase the count for each row with the same date you encounter.

After that, use some plotting module, for instance matplotlib to plot the keys of the map versus the values. That should cover it!

Do you need any more detailed ideas?

Upvotes: 1

Related Questions