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

Icingaweb2 service page not showing pnp thumbnail #32

Closed
totoroliu opened this issue Jul 9, 2018 · 7 comments
Closed

Icingaweb2 service page not showing pnp thumbnail #32

totoroliu opened this issue Jul 9, 2018 · 7 comments
Labels

Comments

@totoroliu
Copy link

totoroliu commented Jul 9, 2018

Expected Behavior

From IcingaWeb2 service page,
I'm expecting to see 5 thumbnails for "one year", "one month", "one week", "25 hours", "4 hours":
https://github.com/Icinga/icingaweb2-module-pnp/blob/master/doc/screenshot/detail_view.png?raw=true

Current Behavior

I don't see any of thumbnails existed under the service page.

But I do see there are 3 "action" links within "Actions" section and above "inspect" linke :
Action 1: http://192.168.100.71/pnp4nagios/graph?host=rick-tftp&srv=check_ping (graph working)
Action 2: http://192.168.100.71/class='tips (page not found)
Action 3: http://192.168.100.71/rel='/pnp4nagios/popup?host=rick-tftp&srv=check_ping (page not found)
The "Action 1" link will open pnp4nagios page with graph.

These 3 "action" links behave the same as my old system,
where 5 thumbnails displayed.

Possible Solution

N/A

Steps to Reproduce (for bugs)

  1. Clean Ubuntu 16.04 installation
  2. Setup/Configure Icinga2 and IcingaWeb2
  3. Refer to this https://tipstricks.itmatrix.eu/installing-icinga2-in-debian-wheezy/ for pnp4nagios configuration

Context

I had an old installation of:

  • Ubuntu 14.04.5
  • Icinga 2.5.4-1ppa1trusty2
  • apache2 2.4.7-1ubuntu4.16
  • php5 5.5.9+dfsg-1ubuntu4.21
  • Icingaweb2 2.4.1-1~ppa1404+1
  • IcingaWeb2 loaded modules:
    doc 2.4.1
    monitoring 2.4.1
    pnp 1.0.1
  • pnp4nagios 0.6.16-2 (from apt-get)

The service page had those thumbnails displayed successfully.

Your Environment

  • Ubuntu 16.04.4
  • Icinga2 2.8.4-1.xenial
  • Apache2 v2.4.18-2ubuntu3.9
  • php 1:7.0+35ubuntu6.1
  • php7.0 7.0.30-0ubuntu0.16.04.1
  • IcingaWeb2 v2.5.3
  • IcingaWeb2 loaded modules:
    director 1.4.3
    doc 2.5.3
    monitoring 2.5.3
    pnp 1.1.0 (git-hash: 6377405)
  • pnp4nagios-0.6.26 (make from source tarball)
@joseph-holland
Copy link

joseph-holland commented Oct 9, 2018

Hi @totoroliu,
Not sure if you've fixed this already, but I had the same issue on Debian 9 following basically the same tutorials.
I've found that once you've enabled the pnp module in IcingaWeb2 you need to ensure that the 'PNP4Nagios configuration' directory is set correctly. See my config.ini below:

[pnp4nagios]
config_dir = "/usr/local/pnp4nagios/etc/"
base_url = "/pnp4nagios"
menu_disabled = "1"
default_query = "host=.pnp-internal&srv=runtime"

Once I set this the thumbnails and graphs started to appear.

Joe

@totoroliu
Copy link
Author

No, I haven't had the fix yet~

What's correct configuration directory?
Where should it point to?

Below is my "/etc/icingaweb2/modules/pnp/config.ini" on Ubuntu 16.04:

[pnp4nagios]
config_dir = "/usr/share/icingaweb2/modules/pnp"
base_url = "/pnp4nagios"
menu_disabled = "0"
default_query = "host=.pnp-internal&srv=runtime"
$ ls -l /usr/share/icingaweb2/modules/pnp
total 60
drwxr-xr-x 6 root root  4096 Jul  8 18:51 application
-rw-r--r-- 1 root root   352 Jul  8 18:51 AUTHORS
-rw-r--r-- 1 root root   788 Jul  8 18:51 CHANGELOG.md
-rw-r--r-- 1 root root   544 Jul  8 18:51 configuration.php
-rw-r--r-- 1 root root   521 Jul  8 18:51 icingaexchange.yml
drwxr-xr-x 3 root root  4096 Jul  8 18:51 library
-rw-r--r-- 1 root root 18091 Jul  8 18:51 LICENSE
-rw-r--r-- 1 root root   330 Jul  8 18:51 module.info
-rw-r--r-- 1 root root  1083 Jul  8 18:51 README.md
-rw-r--r-- 1 root root  1017 Jul  8 18:51 RELEASE.md
-rw-r--r-- 1 root root    38 Jul  8 18:51 run.php

@totoroliu
Copy link
Author

totoroliu commented Oct 9, 2018

oh After using the same config_dir as yours,
everything is working now.
Thank you a lot @joseph-holland

$ cat /etc/icingaweb2/modules/pnp/config.ini 
[pnp4nagios]
config_dir = "/usr/local/pnp4nagios/etc"
base_url = "/pnp4nagios"
menu_disabled = "0"
default_query = "host=.pnp-internal&srv=runtime"

@totoroliu
Copy link
Author

totoroliu commented Oct 9, 2018

@joseph-holland
I'm able to see the thumbnails now.

But I seem getting a duplicate sets,
and the first set of "one year, one month, one week, 25 hours, 4 hours" always stuck in "Loading...".

image

Do you have any idea?

@joseph-holland
Copy link

joseph-holland commented Oct 9, 2018

I noticed this too, but it looks like the bug in Issue #18. Try the fix listed there (I'll try this in the morning too and see if it fixes mine also).

@joseph-holland
Copy link

Yep, as stated in Issue #18, if you comment out the view statements in the config_local.php file, this fixes the double thumbnails.

vim /usr/local/pnp4nagios/etc/config_local.php

Comment out the view statements from around lines 214:

#
# Define default views with title and start timerange in seconds
#
# remarks: required escape on " with backslash
#
#$views[] = array('title' => 'One Hour',  'start' => (60*60) );
#$views[] = array('title' => '4 Hours',   'start' => (60*60*4) );
#$views[] = array('title' => '25 Hours',  'start' => (60*60*25) );
#$views[] = array('title' => 'One Week',  'start' => (60*60*25*7) );
#$views[] = array('title' => 'One Month', 'start' => (60*60*24*32) );
#$views[] = array('title' => 'One Year',  'start' => (60*60*24*380) );

@lazyfrosch
Copy link
Contributor

I guess this issue is resolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants