Data collection from one website to another
Results 1 to 2 of 2

Thread: Data collection from one website to another

  1. #1
    Senior Member Spyrus's Avatar
    Join Date
    Oct 2002
    Posts
    742

    Data collection from one website to another

    I just recently purchased a Environment monitor for my Data center and they come with a primative website interface. I am wanting to pull the data from that website and post it to another website that will log the data and display it every minute....

    the device allows you to go to http://device/temp and will spew out pipe delimited data like so:

    rack1|88.1|rack2|91.1|etc


    I want to be able to post it to a new that I have been working on that displays all the servers in rack 1 then have the temperature displayed next to it.

    This device also supports SNMP if there is another way to do it but I dont know how to even start doing this since I am not a programmer


    Any thoughts suggestions help?
    Duct tape.....A whole lot of Duct Tape
    Spyware/Adaware problem click
    here

  2. #2
    Senior Member
    Join Date
    Oct 2002
    Posts
    1,130
    It would really depend on what you are using as a backend for the website which will be displaying this data.

    If you are using a basic html page, I would recommend running a cron job or something similar which would take that pipe delimited data and put it all into text files, which you can include in a table format in the html code. This could be done with something like:
    Code:
    for temp in 2 4 6 8 10; do
       let rack = temp-1
       cat /device/temp | awk -F| '{ print $\$temp }' > rack$rack
    done
    Which will output the temperature of rack 1 into a file called rack1, and so on for every rack, by separating each field in the output. I think awk would be the best way to do this. I am not quite sure if I have used the correct escape sequences though. These files can then be included in the html, and with a cron job, can be updated every minute or so.

    If you are using php, you can likely find a way to execute that script as part of the page code, and the temperatures for each server will then be updated every time you load the page. I know next to nothing about php however, but I do know that such a technique should be possible.

    Sorry I didn't see this earlier, Spyrus. Hope I helped.
    Government is like fire - a handy servant, but a dangerous master - George Washington
    Government is not reason, it is not eloquence - it is force. - George Washington.

    Join the UnError community!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

 Security News

     Patches

       Security Trends

         How-To

           Buying Guides