wviewweather.com Forum Index wviewweather.com
wview and Weather Topics
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Question: Vantage Pro2 + serial + script + MRTG

 
Post new topic   Reply to topic    wviewweather.com Forum Index -> Configuration
View previous topic :: View next topic  
Author Message
ad-hoc



Joined: 15 Feb 2006
Posts: 8

PostPosted: Fri Feb 17, 2006 3:34 am    Post subject: Question: Vantage Pro2 + serial + script + MRTG Reply with quote

Does anyone know any script in c/c++ or perl or something else (in a Linux/Unix system) that can retrieve data from a Vantage Pro2 console and then using MRTG represents data graphically in a web site?

Thank you
Back to top
View user's profile Send private message
bhnb



Joined: 28 Nov 2005
Posts: 127

PostPosted: Fri Feb 17, 2006 6:29 am    Post subject: Reply with quote

You can feed the data gathered by wview into MRTG quite easily. Presumably you'd be using rrdtool as rateup only deals with integers?

This example assume wview files are in the default location and uses MRTG's external monitoring scripts:

1) First define an htx file for generation - cut and paste the following code into /etc/wview/html/outsideTemp.htx
Code:
<!--outsideTemp-->
0
<!--wviewUpTime-->
outsideTemp


Then add outsideTemp.htx to /etc/wview/html-templates.conf and start/restart/send a HUP to htmlgend.

The corresponding MRTG cfg (outsideTemp.cfg) file is:
Code:
Workdir: /data/mrtg/work
Logformat:  rrdtool
Title[^]: Outside Temperature
PageTop[^]: <H1>Stats for
MaxBytes[_]: 8000
Options[_]: growright, gauge , nopercent , pngdate, noo

Title[outsideTemp]: Outside Temperature
PageTop[outsideTemp]: Outside Temperature</H1>
Target[outsideTemp]: `cat /var/wview/img/outsideTemp.htm`


Then just run 'mrtg outsideTemp.cfg' and that should be it.
Back to top
View user's profile Send private message
bhnb



Joined: 28 Nov 2005
Posts: 127

PostPosted: Fri Feb 17, 2006 6:45 am    Post subject: Reply with quote

There's an example here: http://www.scorpiocomputing.com/weather/metric/mrtg/outsidetemp.html

It's using rateup as I don't presently have rrdtool installed...
Back to top
View user's profile Send private message
ad-hoc



Joined: 15 Feb 2006
Posts: 8

PostPosted: Fri Feb 17, 2006 6:57 am    Post subject: Reply with quote

Thanks a lot Bhnb Wink
Back to top
View user's profile Send private message
bhnb



Joined: 28 Nov 2005
Posts: 127

PostPosted: Fri Feb 17, 2006 7:00 am    Post subject: Reply with quote

No worries.

If necessary it should be fairly easy to generate a load of targets and htx files - let me know.

Cheers

Jon
Back to top
View user's profile Send private message
bhnb



Joined: 28 Nov 2005
Posts: 127

PostPosted: Fri Feb 17, 2006 9:31 am    Post subject: Reply with quote

Just had a thought. If you're using MRTG what would happen if the data gathering system stopped at any time? Would you be able to backfill the MRTG data once you got it going again?
Back to top
View user's profile Send private message
mteel



Joined: 30 Jun 2005
Posts: 435
Location: Collinsville, TX

PostPosted: Fri Feb 17, 2006 11:35 am    Post subject: Reply with quote

I am not familiar with MRTG, but this might be most easily implemented by using one or more alarm scripts to invoke MRTG when new data is received. If we are going to start creating intermediate html files, I would prefer we actually need them to be html. If weather data and a notification scheme are all that is needed, the wview alarms provide several ways to skin that cat.

Mark
Back to top
View user's profile Send private message Send e-mail Visit poster's website
ad-hoc



Joined: 15 Feb 2006
Posts: 8

PostPosted: Thu Apr 27, 2006 4:48 am    Post subject: Reply with quote

Hello... I am back after some long time ago Smile

Bhnb, MRTG seems to work great...

Have you tried to merge 2 values in 1 graph (with different colors)? For example Outside Temp + DewPoint ?

If you have or you know, please let me know Smile

Thanks....
Back to top
View user's profile Send private message
bhnb



Joined: 28 Nov 2005
Posts: 127

PostPosted: Tue May 30, 2006 1:58 pm    Post subject: Reply with quote

Yes - a graph with two values works. Changing the example given above to this:

Code:
<!--outsideTemp-->
<!--outsideDewPt-->
<!--wviewUpTime-->
targetname


Will give what you need.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    wviewweather.com Forum Index -> Configuration All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group