If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > General > Database Concepts & Design > Trying to develop a conceptual model

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-25-09, 13:16
daveomcgee daveomcgee is offline
Registered User
 
Join Date: Mar 2009
Posts: 1
Trying to develop a conceptual model

Hi everyone,

I'm currently involved in a small project as part of a college assignment. The project is a Python script that pulls a node from a database, pings the node every minute and sends a number of metrics from the ping response to a MySQL database and creates a new row each time which is timestamped (This part is fine)

I now wish to develop reporting functionality in order to create reports based on the data in the database, such as "Node availability" or "Node performance" over time. For example, If I have a week's worth of ping responses in a database for "google.com" and every row advises that google was "reachable" when pinged - I wish to turn this into a value like 100% and display this value in my JSP web application

Does anyone have anybody have any previous experience with generating such report data with a focus on timestamps?

Thanks for your attention.
Reply With Quote
  #2 (permalink)  
Old 03-25-09, 13:57
loquin loquin is offline
Super Moderator
 
Join Date: Jun 2004
Location: Arizona, USA
Posts: 1,797
Since each ping represents a 1 minute interval, you shouldn't have to worry about the actual timestamp in the calculation of availability. (You would use it to determine the report boundries, though.)

Code:
Select NodeNum, Count(NodeNum)/(7*24*60) * 100 as Availability
From NodeTable
Where TimeStamp >= 'StartDateTime' and TimeStamp <= 'EndDateTime'
__________________
Lou
使大吃一惊
"Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
"I have my standards. They may be low, but I have them!" - Bette Middler
"It's a book about a Spanish guy named Manual. You should read it." - Dilbert


Last edited by loquin; 03-25-09 at 14:00.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On