Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Smokeping setup instructions so they actually work #9731

Merged
merged 1 commit into from Feb 13, 2019
Merged

Fix Smokeping setup instructions so they actually work #9731

merged 1 commit into from Feb 13, 2019

Conversation

fake-name
Copy link
Contributor

I'm walking through installing smokeping, and running into some minor issues in the docs.

Basically:

  1. Smokeping is a fastcgi application, and the config in the docs assumes that you have a fastcgi handler installed (fastcgi_pass unix:/var/run/fcgiwrap.socket;). I did not, and you get confusing errors.
  2. The Example config generation snippet generates a config that isn't valid (see the section about Why echo "+ LibreNMS" ?). Since I don't exactly want to wait a day for cron to do it's thing, I ran the manual generator, which causes smokeping to explode on start.
  3. I'm still not sure where the smokeping stuff is supposed to show up in the LibreNMS UI.

It's only a Docs change, so.... probably?

I'm walking through installing smokeping, and running into some minor issues in the docs.

Basically: 
 1. Smokeping is a `fastcgi` application, and the config in the docs assumes that you have a fastcgi handler installed (`fastcgi_pass unix:/var/run/fcgiwrap.socket;`). I did not, and you get confusing errors.
2. I'm still not sure where the smokeping stuff is supposed to show up in the UI.
@CLAassistant
Copy link

CLAassistant commented Jan 25, 2019

CLA assistant check
All committers have signed the CLA.

@murrant murrant changed the title Fix setup instructions so they actually work Fix Smokeping setup instructions so they actually work Jan 25, 2019
@murrant
Copy link
Member

murrant commented Jan 25, 2019

I guess it just shows up as a graph, go to a device, click a graph then, click the drop down and switch to smokeping.

@fake-name
Copy link
Contributor Author

I guess it just shows up as a graph, go to a device, click a graph then, click the drop down and switch to smokeping.

Ohhhhh, there it is. That is.... extremely not discoverable.

Also, is there no way to go to the smokeping sub-site short of manually entering the URL?

@murrant
Copy link
Member

murrant commented Jan 28, 2019

I don't know much about smokeping at all :(

So, I assume no. Definitely could be added to the menu.

@murrant murrant merged commit 9766cad into librenms:master Feb 13, 2019
@fake-name fake-name deleted the patch-1 branch February 13, 2019 04:16
@mattie47
Copy link
Contributor

mattie47 commented Apr 3, 2019

@fake-name

Also, is there no way to go to the smokeping sub-site short of manually entering the URL?

Configure nginx or Apache to point to your smokeping URL. That's what I did originally. No there isn't a link to smokeping within LibreNMS.

Since I don't exactly want to wait a day for cron to do it's thing, I ran the manual generator, which causes smokeping to explode on start.

From memory the script generates a config file. You should verify the data before running the config within Smokeping. Again I can't remember the exact details.

Basically I rewrote the smokeping docs 9 months ago after being frustrated with the previous version not completely explaining everything. Overall after setting it all up, smokeping wasn't super useful....

@mattie47
Copy link
Contributor

mattie47 commented Apr 3, 2019

And I know a PR isn't the best place to put below, but this was my nginx config I used for Smokeping, LibreNMS, Oxidized, phpmyadmin. Just thought I'd post it in case someone comes across this on google wanting an example config.

librenms@librenms:/etc/nginx/conf.d$ cat librenms.conf
server {
 listen      80;
 server_name librenms.xxxx.local;
 root        /opt/librenms/html;
 index       index.php;

 charset utf-8;
 gzip on;
 gzip_types text/css application/javascript text/javascript application/x-javascript image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon;
 location / {
  try_files $uri $uri/ /index.php?$query_string;
 }
 location /api/v0 {
  try_files $uri $uri/ /api_v0.php?$query_string;
 }
 location ~ \.php {
  include fastcgi.conf;
  fastcgi_split_path_info ^(.+\.php)(/.+)$;
  fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
 }
 location ~ /\.ht {
  deny all;
 }
  
 location = /smokeping/smokeping.cgi {
	fastcgi_intercept_errors on;

	fastcgi_param	SCRIPT_FILENAME		/usr/lib/cgi-bin/smokeping.cgi;
	fastcgi_param	QUERY_STRING		$query_string;
	fastcgi_param	REQUEST_METHOD		$request_method;
	fastcgi_param	CONTENT_TYPE		$content_type;
	fastcgi_param	CONTENT_LENGTH		$content_length;
	fastcgi_param	REQUEST_URI		$request_uri;
	fastcgi_param	DOCUMENT_URI		$document_uri;
	fastcgi_param	DOCUMENT_ROOT		$document_root;
	fastcgi_param	SERVER_PROTOCOL		$server_protocol;
	fastcgi_param	GATEWAY_INTERFACE	CGI/1.1;
	fastcgi_param	SERVER_SOFTWARE		nginx/$nginx_version;
	fastcgi_param	REMOTE_ADDR		$remote_addr;
	fastcgi_param	REMOTE_PORT		$remote_port;
	fastcgi_param	SERVER_ADDR		$server_addr;
	fastcgi_param	SERVER_PORT		$server_port;
	fastcgi_param	SERVER_NAME		$server_name;
	fastcgi_param	HTTPS			$https if_not_empty;

	fastcgi_pass unix:/var/run/fcgiwrap.socket;
}

	location ^~ /smokeping/ {
		alias /usr/share/smokeping/www/;
		index smokeping.cgi;
		gzip off;
	}


#Oxidized proxy
        server_name oxidized;
        location /oxidizedweb/ {
        proxy_pass http://127.0.0.1:8888/oxidizedweb/;
        access_log /var/log/nginx/access_oxidized.log;
        error_log /var/log/nginx/error_oxidized.log;
        }

#phpmyadmin config        
        server_name phpmyadmin;
        location /phpmyadmin {
                root /usr/share/;
                index index.php index.html index.htm;
                access_log /var/log/nginx/access_phpmyadmin.log;
                error_log /var/log/nginx/error_phpmyadmin.log;
                location ~ ^/phpmyadmin/(.+\.php)$ {
                        try_files $uri =404;
                        fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
                        fastcgi_index index.php;
                        include fastcgi.conf;
                        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                        include /etc/nginx/fastcgi_params;
                        gzip off;
                }
        }

        location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
                root /usr/share/;
                }
        
        location /phpMyAdmin {
                rewrite ^/* /phpmyadmin last;
        }


}

Thanks,

Matt

mattie47 added a commit to mattie47/librenms that referenced this pull request Apr 3, 2019
Fixed a couple more things after librenms#9731 and librenms#10045 make some changes.
@mattie47 mattie47 mentioned this pull request Apr 3, 2019
1 task
PipoCanaja pushed a commit that referenced this pull request Apr 3, 2019
Fixed a couple more things after #9731 and #10045 make some changes.
spencerbutler pushed a commit to spencerbutler/librenms that referenced this pull request May 21, 2019
Fixed a couple more things after librenms#9731 and librenms#10045 make some changes.
@lock lock bot locked as resolved and limited conversation to collaborators Jun 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants