[smokeping-users] is it using fast cgi or not?

ITheodoridis at bankofgreece.gr ITheodoridis at bankofgreece.gr
Thu Sep 26 14:40:29 CEST 2013


I followed my own advice and added a SetHandler directive under the directory entry for cgi-bin in apache configuration. It seems I have managed to break how apache + smokeping figure out what to do with the smokeping.fcgi so I get 
#!/bin/sh
/opt/smokeping/bin/smokeping_cgi /opt/smokeping/etc/config 
in the browser window i.e. the contents of the smokeping .fcgi file.

In /opt/smokeping/bin/smokeping_cgi there is a call to CGI::Fast so maybe that is enough. I give up, I don't know enough about apache to figure this out.
Maybe some of you can give a hand there so we can understand how this works. I am afraid that the documentation on the smokeping site ("how to install smokeping" does not provide info on how it works, just points to the mod_fcgid apache documentation).
So to sum up, take those links I provided under consideration but don't do what I suggested, until we figure this out.
Ioannis


-----Original Message-----
From: Theodoridis Ioannis 
Sent: Thursday, September 26, 2013 1:43 PM
To: will at facetofacedigital.com
Cc: smokeping-users at lists.oetiker.ch
Subject: Re: [smokeping-users] Problem finding the HTDocs file

If the url you are using ends with .fcgi, then it's all about the apache configuration. 
With Rasbian you will probably have to dig into the Apache config yourself to check if the mod-fcgi is declared properly to be used (it calls certain libraries, I have done that on my own once but ever since it seems to be working fine with default install). I will check later on the pi and let you know if I can draw any conclusions from it.

If you are getting the crosshair but no zoom something maybe wrong on the basepage.html file. Check in there to see if all references for the javascript point to the correct locations.
<script src="/cropper/lib/prototype.js" type="text/javascript"></script> <script src="/cropper/lib/scriptaculous.js?load=builder,effects,dragdrop"
type="text/javascript"></script>
<script src="/cropper/cropper.js" type="text/javascript"></script> <script src="/cropper/smokeping-zoom.js"
type="text/javascript"></script>
This is what I got on my main installation (I don't use the pi for master installation, so this comes from an Open SuSE system), as you can see I got the cropper dir in the webroot directory (/srv/www/htdocs in OpenSuSE, probably in /var/www in Debian/Ubuntu like systems). 

For the apache part, in Open SuSE there is a modular structure with config  files in them, most of them under /etc/apache2/conf.d . In that dir you can find the config file for mod-fcgid (mod_fcgid.conf) which contains all the necessary declarations for fcgi module.  Also in sysconfig.d directory there is the loadmodule.conf file where you need to declare the module to be loaded for example:
LoadModule fcgid_module                   /usr/lib/apache2/mod_fcgid.so

In the main config file (default-server.conf) you must have a handler declaration.
For the mod-fcgid the proposed handler from the apache documentation is something like this

<Directory /usr/local/apache/fcgi-bin/>
SetHandler fcgid-script
Options +ExecCGI
# Customize the next two directives for your requirements.
Order allow,deny
Allow from all
</Directory>
 This comes from this page:
http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html
So without being an expert on the subject, if you have defined a handler for your module and made sure it is loaded, it should work. You could check with your apache logs to see if something is going wrong. I am afraid that's as far as my knowledge will take me until now, I am happy to learn something if someone else can provide more accurate information.

The php handler is used when you call this method from php pages. I don't think it applies here (referring to Artiflo's mail) since we are not using php.

I will check where the configs are in Rasbian (if possible) and get back to you.
Ioannis
-----Original Message-----
From: Will Brocklebank [mailto:will at facetofacedigital.com]
Sent: Wednesday, September 25, 2013 5:57 PM
To: Theodoridis Ioannis
Cc: smokeping-users at lists.oetiker.ch
Subject: Re: [smokeping-users] Problem finding the HTDocs file

Thanks again. I do get the cross-hairs but when I drag over a portion of the graph nothing happens.

Is there a way I can check if it is using FastCGI? It's not a problem but it probably takes 5 seconds to load any page at the moment. 

Startup seems to be working fine across reboot but I'll check again this evening.


==============================================================================================================
Με την επιφύλαξη παντός νομίμου δικαιώματός μας. Κάθε μήνυμα ηλεκτρονικού ταχυδρομείου από την Τράπεζα της Ελλάδος (ΤτΕ) αποστέλλεται καλόπιστα αλλά δεν τη δεσμεύει ούτε ερμηνεύεται ως να συνιστούσε ή επηρέαζε συμβατική ή άλλη δέσμευση της ΤτΕ.

Το μήνυμα ηλεκτρονικού ταχυδρομείου προορίζεται προς αποκλειστική χρήση του προσώπου, του οποίου η διεύθυνση αναγράφεται στην επικεφαλίδα του μηνύματος. Ο αποστολέας και η ΤτΕ δεν αναλαμβάνουν καμμία ευθύνη για ανακριβειες, παραβίαση της ακεραιότητας, απώλεια ή καθυστερημένη διαβίβαση του μηνύματος, για αστοχία, διακοπή ή υποβάθμιση της υπηρεσίας ή του μηνύματος καθώς και για κάθε εξ αυτού του λόγου απώλεια ή ζημία καθόλη την υπό του νόμου προβλεπόμενη έκταση.

Εάν λάβατε κατά λάθος το παρόν μήνυμα ηλεκτρονικού ταχυδρομείου, παρακαλούμε να ειδοποιήσετε αμέσως μέσω ηλεκτρονικού ταχυδρομείου τον αποστολέα και να διαγράψετε το μήνυμα. Οποιαδήποτε ανακοίνωση, διάδοση ή χρήση μέρους ή ολόκληρου του μηνύματος χωρίς άδεια απαγορεύεται αυστηρά και μπορεί να επιφέρει ποινική και αστική ευθύνη.


Any e-mail message from the Bank of Greece (BoG) is sent in good faith but shall neither be binding nor construed as constituting or affecting a contractual arrangement or other commitment by the BoG.

The e-mail is intended for the exclusive use of the person whose e-mail address appears in caption as recipient. The sender and the BoG decline liability for inaccuracy, breach of integrity, loss or delayed delivery of the message, for any failure in, interruption to or degradation of either the service or the message, as well as for any loss or damage sustained thereof to the fullest extent provided by law.

If this e-mail was not intended for you, please notify the sender immediately via e-mail and delete it at once. Any unauthorized disclosure, dissemination or use, either in whole or in part is strictly prohibited and may give rise to both criminal and civil liability. All rights reserved.
==============================================================================================================



More information about the smokeping-users mailing list