Project

General

Profile

[Solved] Smokeping graphs not showing on web interface

Added by costis over 10 years ago

I want to believe I have correctly setup smokeping and lighttpd but something seems to be missing from the latter.

When I visit smokeping's webpage it loads, but the graphs are blank, like in the attached Picture 1.

Then I click on the first empty graph and I see Picture 2.

The image is blank, but the mouse cursor changes to crosshair and I can see a blank image like in Picture 3.

When I choose a region with the crosshair cursor I can see the graph like I should

The image files are browseable here and they seem to be updated, since I can view them with an image viewer, but I cannot see them on the web interface as explained before:

-rw-rw-rw- 1 smokeping http 21460 Nov 12 03:54 Server_last_108000.png
-rw-rw-rw- 1 smokeping http 22987 Nov 12 03:54 Server_last_10800.png
-rw-rw-rw- 1 smokeping http 19628 Nov 12 03:54 Server_last_34560000.png
-rw-rw-rw- 1 smokeping http 19692 Nov 12 03:54 Server_last_864000.png
-rw-rw-rw- 1 smokeping http    33 Nov 12 03:54 Server.maxheight
-rw-rw-rw- 1 smokeping http  9917 Nov 12 03:54 Server_mini.png

Any ideas of how to be able to see the images without choose a region every time?

PS: I have posted the same at the Arch Forums

My configuration files are
/etc/lighttpd/lighttpd.conf:

# This is a minimal example config
# See /usr/share/doc/lighttpd
# and http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ConfigurationOptions

server.port        = 80
server.username        = "http" 
server.groupname    = "http" 
server.document-root    = "/srv/http" 
server.errorlog        = "/var/log/lighttpd/error.log" 
dir-listing.activate    = "enable" 
index-file.names    = ( "index.html" )
mimetype.assign        = (
                ".html" => "text/html",
                ".txt" => "text/plain",
                ".css" => "text/css",
                ".js" => "application/x-javascript",
                ".jpg" => "image/jpeg",
                ".jpeg" => "image/jpeg",
                ".gif" => "image/gif",
                ".png" => "image/png",
                "" => "application/octet-stream" 
            )
include "conf.d/cgi.conf" 
#include "conf.d/fastcgi.conf" 

/etc/lighttpd/conf.d/cgi.conf:

server.modules += ( "mod_cgi" )

cgi.assign                 = ( ".pl"  => "/usr/bin/perl",
                               ".cgi" => "/usr/bin/perl",
                               ".rb"  => "/usr/bin/ruby",
                               ".erb" => "/usr/bin/eruby",
                               ".py"  => "/usr/bin/python",
                               ".php" => "/usr/bin/php-cgi" )

index-file.names           += ( "index.pl",   "default.pl",
                               "index.rb",   "default.rb",
                               "index.erb",  "default.erb",
                               "index.py",   "default.py",
                               "index.php",  "default.php" )

/etc/lighttpd/conf.d/fastcgi.conf

#######################################################################
##
##  FastCGI Module 
## --------------- 
##
## http://www.lighttpd.net/documentation/fastcgi.html
##
server.modules += ( "mod_fastcgi" )

##
## PHP Example
## For PHP don't forget to set cgi.fix_pathinfo = 1 in the php.ini.
##
## The number of php processes you will get can be easily calculated:
##
## num-procs = max-procs * ( 1 + PHP_FCGI_CHILDREN )
##
## for the php-num-procs example it means you will get 17*5 = 85 php
## processes. you always should need this high number for your very
## busy sites. And if you have a lot of RAM. :)
##
#fastcgi.server = ( ".php" =>
#                   ( "php-local" =>
#                     (
#                       "socket" => socket_dir + "/php-fastcgi-1.socket",
#                       "bin-path" => server_root + "/cgi-bin/php5",
#                       "max-procs" => 1,
#                       "broken-scriptfilename" => "enable",
#                     )
#                   ),
#                   ( "php-tcp" =>
#                     (
#                       "host" => "127.0.0.1",
#                       "port" => 9999,
#                       "check-local" => "disable",
#                       "broken-scriptfilename" => "enable",
#                     )
#                   ),
#
#                   ( "php-num-procs" =>
#                     (
#                       "socket" => socket_dir + "/php-fastcgi-2.socket",
#                       "bin-path" => server_root + "/cgi-bin/php5",
#                       "bin-environment" => (
#                         "PHP_FCGI_CHILDREN" => "16",
#                         "PHP_FCGI_MAX_REQUESTS" => "10000",
#                       ),
#                       "max-procs" => 5,
#                       "broken-scriptfilename" => "enable",
#                     )
#                   ),
#                )

##
## Ruby on Rails Example
##
## Normally you only run one Rails application on one vhost.
##
#$HTTP["host"] == "rails1.example.com" {
#  server.document-root  = server_root + "/rails/someapp/public" 
#  server.error-handler-404 = "/dispatch.fcgi" 
#  fastcgi.server = ( ".fcgi" =>
#    ("someapp" =>
#      ( "socket" => socket_dir + "/someapp-fcgi.socket",
#        "bin-path" => server_root + "/rails/someapp/public/dispatch.fcgi",
#        "bin-environment" => (
#              "RAILS_ENV" => "production",
#              "TMP" => home_dir + "/rails/someapp",
#        ),
#      )
#    )
#  )
#}

##
## Another example with multiple rails applications on one vhost.
##
## http://blog.lighttpd.net/articles/2005/11/23/lighttpd-1-4-8-and-multiple-rails-apps
##
#$HTTP["host"] == "rails2.example.com" {
#  $HTTP["url"] =~ "^/someapp1" {
#    server.document-root  = server_root + "/rails/someapp1/public" 
#    server.error-handler-404 = "/dispatch.fcgi" 
#    fastcgi.server = ( ".fcgi" =>
#      ("someapp1" =>
#        ( "socket" => socket_dir + "/someapp1-fcgi.socket",
#          "bin-path" => server_root + "/rails/someapp1/public/dispatch.fcgi",
#          "bin-environment" => (
#                "RAILS_ENV" => "production",
#                "TMP" => home_dir + "/rails/someapp1",
#          ),
#          "strip-request-uri" => "/someapp1/" 
#        )
#      )
#    )
#  }
#
#  $HTTP["url"] =~ "^/someapp2" {
#    server.document-root  = server_root + "/rails/someapp2/public" 
#    server.error-handler-404 = "/dispatch.fcgi" 
#    fastcgi.server = ( ".fcgi" =>
#      ("someapp2" =>
#        ( "socket" => socket_dir + "/someapp2-fcgi.socket",
#          "bin-path" => server_root + "/rails/someapp2/public/dispatch.fcgi",
#          "bin-environment" => (
#                "RAILS_ENV" => "production",
#                "TMP" => home_dir + "/rails/someapp2",
#          ),
#          "strip-request-uri" => "/someapp2/" 
#        )
#      )
#    )
#  }
#}

## chrooted webserver + external PHP
##
## $ spawn-fcgi -f /usr/bin/php-cgi -p 2000 -a 127.0.0.1 -C 8
##
## webserver chrooted to /srv/www/
## php running outside the chroot
#
#fastcgi.server = ( 
#  ".php" => (( 
#    "host" => "127.0.0.1",
#    "port" => "2000",
#    "docroot" => "/srv/www/servers/www.example.org/htdocs/" 
#  )))
#
#server.chroot = "/srv/www" 
#server.document-root = "/servers/wwww.example.org/htdocs/" 
#
fastcgi.server = ( "/" =>
    ((
   "socket" => "/tmp/fastcgi.socket",
   "bin-path" => "/srv/http/index.py",
   "max-procs" => 1,
   "bin-environment" => (
     "REAL_SCRIPT_NAME" => "" 
   ),
   "check-local" => "disable" 
    ))
)

server.modules += ( "mod_fastcgi" )

index-file.names += ( "index.php" ) 

fastcgi.server = (
    ".php" => (
      "localhost" => ( 
        "socket" => "/run/php-fpm/php-fpm.sock",
        "broken-scriptfilename" => "enable" 
      ))
)
##
#######################################################################


Replies (1)

RE: Smokeping graphs not showing on web interface - Added by costis over 10 years ago

Sorry for the fuss I got it working with a work-around. The web page is serving images with urls like http://localhost/smokeping/cache/imagefilename.png, but /srv/httpd/smokeping/cache does not exist. I created a link from /srv/httpd/smokeping/cache to /srv/smokeping/cache where the images are actually stored. I must have missed something in the configuration of smokeping I suppose. Thanks :)

    (1-1/1)