Comments (13)
Have you installed the pnp api extension as mentioned here in the Readme? Afaik it is still not included in the latest pnp4nagios release.
from grafana-pnp-datasource.
I just make:
wget "https://github.com/lingej/pnp-metrics-api/raw/master/application/controller/api.php"
-O /usr/local/pnp4nagios/share/application/controllers/api.php
restart all and still have problem:
from grafana-pnp-datasource.
If there is an internal server error, there should be something logged anywhere. Most probably in the apache error log
from grafana-pnp-datasource.
from grafana-pnp-datasource.
Meaby something is wrong here?
from grafana-pnp-datasource.
not really helpful. You could have a look at the chrome dev tools or the firefox web developer toolbar while testing the datasource and see if there are any hints in the response.
from grafana-pnp-datasource.
from grafana-pnp-datasource.
good, thats something to fix. Just make sure the api.php has the same permissions and owner/group as the other controller php files in that folder.
from grafana-pnp-datasource.
But sill have something like:
from grafana-pnp-datasource.
here are some curl commands to manually test the api: https://github.com/lingej/pnp-metrics-api
Make sure the api works. Thats nothing this datasource can do about it.
from grafana-pnp-datasource.
Meaby problem is here?
I will try the curls commands
from grafana-pnp-datasource.
Same issue here. I think related to SELinux. Check /var/log/audit/audit.log
type=AVC msg=audit(1596038131.954:1851): avc: denied { getattr } for pid=29839 comm="httpd" path="/usr/local/monitoring/addons/pnp/share/application/controllers/api.php" dev="dm-0" ino=74720090 scontext=system_u:system_r:httpd_t:s0 tcontext=unconfined_u:object_r:admin_home_t:s0 tclass=file permissive=0
from grafana-pnp-datasource.
In my case there were two roots for that problem, try to set selinux permissive (temporal solution) with
sudo setenforce 0
Consider that i'm using centOS 7
Also, I added a Require policy in /etc/httpd/conf.d/pnp4nagios.conf
"Require host localhost"
# SAMPLE CONFIG SNIPPETS FOR APACHE WEB SERVER
Alias /pnp4nagios "/usr/local/pnp4nagios/share"
<Directory "/usr/local/pnp4nagios/share">
AllowOverride None
Order allow,deny
Allow from all
#
# Use the same value as defined in nagios.conf
#
Require host localhost
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user
<IfModule mod_rewrite.c>
# Turn on URL rewriting
RewriteEngine On
Options symLinksIfOwnerMatch
# Installation directory
RewriteBase /pnp4nagios/
# Protect application and system files from being viewed
RewriteRule "^(?:application|modules|system)/" - [F]
# Allow any files or directories that exist to be displayed directly
RewriteCond "%{REQUEST_FILENAME}" !-f
RewriteCond "%{REQUEST_FILENAME}" !-d
# Rewrite all other URLs to index.php/URL
RewriteRule "^.*$" "index.php/$0" [PT]
</IfModule>
</Directory>
from grafana-pnp-datasource.
Related Issues (20)
- Limiting the output of the data from a multitude of hosts into graph HOT 2
- PNP yaml config file HOT 2
- Special characters in host or service name HOT 2
- TSDB auth fails HOT 1
- Feature request: Grafana variables in wildcard search HOT 2
- using wildcards? HOT 2
- Authentication with check-mk-raw HOT 2
- transpile error HOT 5
- Add dashboard variable HOT 4
- Grafana v7.3.1 (6668161a88 HOT 2
- Data source not connected: 404 Not Found in grafana HOT 2
- Cant add graph if host is down/graph stops working if host goes down HOT 2
- Grafana 8.3.4 HOT 7
- Feature Request: Ability to use regex or wildcards on "Label" option HOT 2
- 2.0.0 -> "Plugin disabled" HOT 6
- Cant Calculate % DISK or SWAP Free / Used with Native Nagios Plugin, PNP and Grafana HOT 4
- Probably wrong API URL HOT 1
- Template variables not expanded HOT 1
- Problem in configuring the pnp plugin
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grafana-pnp-datasource.