Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

So, I work for a NOC in a small ISP. We're planning on getting a large wall mounted monitor and I'd like to make a dashboard in Node.JS - I've never used node before so it should be interesting.

I'm aiming for something like this as a vague example: https://gds.blog.gov.uk/wp-content/uploads/sites/60/2012/02/developmentprocess.png

The data we will pull will be from Nagios + Icinga boxes (we have many). Currently I have a script that fetches all the problems from our Nagios + Icinga boxes and dumps them in to a MySQL table. It's then possible to have a PHP dashboard that just displays data from those tables, and an auto-refresh plugin for the browser.

What I want to do is use a node.js front end so refreshing isn't required. From tutorials, it seems you need to send events to node to make it work properly. What I want to do is the MySQL method as we can then use it for reports etc.

Imagine in that image, the right contains a list of all problems, and the numbers are counts of all problems. How do I get node to realise there's new data, compare what clients are already displaying and display changes?

  1. Constantly pull data from the database, compare to an array of currently displayed data, send any changes to the client
  2. Somehow construct a query to find only new data (based on current time maybe?) push that (need to find out what has cleared though and is no longer in database)
  3. Something else altogether

I'm a pretty skilled PHP developer, but live updating with something like node is alien to me. I'm following the infrastructure used by Manuel Kiessling in nodebeginner.org (index > server > router > request handler for each page - there'll be different pages for different info i.e. nagios/icinga, BGP peers etc).

Any help appreciated, if I can't think of a solid way to do it I'll end up going back to PHP which is a shame as node really interests me.

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.