emmdim / snpservices Goto Github PK
View Code? Open in Web Editor NEWThis project forked from guifi/snpservices
This project forked from guifi/snpservices
This software provides graph services in the context of the Spontaneous Networking Platform. Uses nodexchange/cnml as a input format, and provides traffic and latency/availability graphs in image format by using mrtg/rrdtool collected history by simple HTTP URLs, therefore is easily plugable to any web application. PREREQUISITES: You must have rrdtool, rrdtool-perl, rrdtool-php, mrtg and php-gd Optionally git, in order to checkout the files INSTALL: 1.-Checkout the latest GIT version into a directory accessible by an http server: example: cd /var/www/html git clone git://github.com/guifi/snpservices.git To publish the directory, you might create an alias into the apache configuration for the directory: Alias /snpservices /var/www/html/snpservices 2.-Make the directory snpservices/tmp writable to everybody chmod a+rw snpservices/tmp 3.-Create a guifi service at the database. Use this url http://yourserver/snpservices 4.-Copy the common/config.php.template to config.php and edit it to set your values. In particular take attention to: -Set the Service ID (SNPGraphServerId) to match your service created in the database -Point MRTGConfigSource. If you don't have a cached CNML, use your Data server, be sure you specify the zone you are using as at the server parameter -Point CNMLSource. Use your Data server IMPORTANT: You can skip 5 & 6 if you don't have old files to rename, however is a good idea to execute the 'wget' commant just to be sure that you data server is ready to graph feed your server. Think that may take a while to be ready for exporting your data. 5.-If you have the rrd files in an old format (devicename*.rrd) If you have old graph files which you like to retain, rename them into the new format, by creating a script with the following format: wget -O x.sh "http://snpservices.guifi.net/snpservices/graphs/cnml2mrtgcsv.php?cp&server=ServerID#" Where the server number is the number of your server 6.-If you simply want a list of the files at another server, get a list from them with: wget -O x.sh "http://snpservices.guifi.net/snpservices/graphs/cnml2mrtgcsv.php?list&server=ServerID#" Where the server number is the number of your server 7.-Install a cron job to run the mrtg and refresh your configi every 5 mins: Can be something like this: cd /var/www/snpservices/graphs; php mrtgcsv2mrtgcfg.php; /usr/bin/mrtg ../data/mrtg.cfg --lock-file /var/lock/mrtg/guifi_l --confcache-file
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.