Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
jriker1
Posts: 115 Joined: Tue Dec 15, 2015 8:40 pm
Post
by jriker1 » Wed Dec 23, 2015 3:19 pm
Is there a reason gd2 icons would show missing on my map? I have setup Nagios as such:
Code: Select all
define host{
use linux-server ; Name of host template to use
; This host definition will inherit all variables that are defined
; in (or inherited by) the linux-server host template definition.
host_name Nagios
alias localhost
address 127.0.0.1
icon_image nagios.gif
statusmap_image nagios.gd2
}
However on the statusmap, the image is missing both on screen and when I hover but the logo file does exist.
Thoughts?
Thanks.
JR
hsmith
Agent Smith
Posts: 3539 Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:
Post
by hsmith » Wed Dec 23, 2015 3:22 pm
What are the permissions on the image files?
Former Nagios Employee.
me.
tmcdonald
Posts: 9117 Joined: Mon Sep 23, 2013 8:40 am
Post
by tmcdonald » Wed Dec 23, 2015 3:22 pm
If you right-click on the page and view the page source, does the gd2 file appear to be included? It's possible it is a rendering thing, but just as likely that it is not included for some reason.
Also, what Nagios version are you using?
Former Nagios employee
jriker1
Posts: 115 Joined: Tue Dec 15, 2015 8:40 pm
Post
by jriker1 » Wed Dec 23, 2015 3:29 pm
Thanks for the replies.
All files are owned by root (except unknown.* owned by nagios) and show:
[*]Owner read/write
[*]group read
[*]Everyone read
One item to note, even though all permissions are the same, all gif, jpg, png are purple color files and all gd2's are white.
Running Nagios 4.1.1 on CentOS 7.
Also the source for the Map is short and doesn't contain a reference to gd2 but not sure if it's supposed to since isn't that map generated using the gd2 files on the back end?
Code: Select all
<!DOCTYPE html>
<html ng-app="mapApp">
<head>
<meta charset="utf-8"/>
<title>Nagios Map</title>
<link type="image/ico" rel="shortcut icon" href="images/favicon.ico"/>
<link type="text/css" rel="stylesheet"
href="bootstrap-3.3.0/css/bootstrap.min.css">
<link type="text/css" rel="stylesheet"
href="bootstrap-3.3.0/css/bootstrap-theme.min.css">
<link type='text/css' rel='stylesheet' href='stylesheets/common.css'/>
<link type='text/css' rel='stylesheet' href='stylesheets/map.css'/>
<link type='text/css' rel='stylesheet' href='stylesheets/map-directive.css'/>
<script type="text/javascript" src="d3/d3.min.js"></script>
<script type="text/javascript"
src="angularjs/angular-1.3.9/angular.min.js"></script>
<script type="text/javascript"
src="angularjs/ui-bootstrap-tpls-0.12.0.min.js"></script>
<script type="text/javascript"
src="angularjs/ui-utils-0.2.1/ui-utils.js"></script>
<script type="text/javascript" src="spin/spin.min.js"></script>
<script type="text/javascript" src="js/map.js"></script>
<script type="text/javascript" src="js/map-directive.js"></script>
<script type="text/javascript" src="js/map-form.js"></script>
<script type="text/javascript" src="js/nagios-decorations.js"></script>
<script type="text/javascript" src="js/nagios-time.js"></script>
</head>
<body ng-controller="mapCtrl">
<div id="image-cache" style="display: none;"></div>
<div id="header-container">
<div info-box cgiurl="{{params.cgiurl}}"
decoration-title="{{infoBoxTitle()}}"
update-interval="10"
last-update="lastUpdate"
initial-state="collapsed"
collapsable="true"
include-partial="map-links.html">
</div>
</div>
<div id="map-container" ng-hide="formDisplayed"
nagios-map
cgiurl="{{params.cgiurl}}"
layout="{{params.layout}}"
dimensions="{{params.dimensions}}"
ulx="{{params.ulx}}"
uly="{{params.uly}}"
lrx="{{params.lrx}}"
lry="{{params.lry}}"
root="params.root"
maxzoom="params.maxzoom"
nolinks="{{params.nolinks}}"
notext="{{params.notext}}"
nopopups="{{params.nopopups}}"
noresize="{{params.noresize}}"
noicons="{{params.noicons}}"
iconurl="{{params.iconurl}}"
reload="{{reload}}"
update-interval="10"
last-update="lastUpdate"
map-width="svgWidth"
map-height="svgHeight"
build="canBuildMap()">
</div>
<div id="menubutton" ng-style="menuButtonStyle()"
ng-hide="params.nomenu">
<button type="button" class="btn"
ng-click="displayForm()">
<img src="images/menu.png"/>
</button>
</div>
</div>
</body>
</html>
Note if I don't define an icon the green dot does show.
Nothing of note in the Apache logs either.
Thanks.
JR
ssax
Dreams In Code
Posts: 7682 Joined: Wed Feb 11, 2015 12:54 pm
Post
by ssax » Wed Dec 23, 2015 3:37 pm
If you click the legacy map does it show them there?
jriker1
Posts: 115 Joined: Tue Dec 15, 2015 8:40 pm
Post
by jriker1 » Wed Dec 23, 2015 3:42 pm
Yep, shows on the map and on the boxes when you hover over a system. However believe those are using the gif images as you can see it in the source.
Do I have to install pngtogd2 or something for this to render right or is the fact the map is there at all mean it's kinda working?
Edit: For reference gd-2.0.35-26.e17.x86_64 installed.
JR
ssax
Dreams In Code
Posts: 7682 Joined: Wed Feb 11, 2015 12:54 pm
Post
by ssax » Wed Dec 23, 2015 5:05 pm
My legacy one is working with the GD2 but not in the new one, this is likely a bug.
ssax
Dreams In Code
Posts: 7682 Joined: Wed Feb 11, 2015 12:54 pm
Post
by ssax » Wed Dec 23, 2015 5:14 pm
gif and gd2 are not working for me on the new one, only gd2 is working for me on the legacy.
Yours is showing gif just fine on both?
jriker1
Posts: 115 Joined: Tue Dec 15, 2015 8:40 pm
Post
by jriker1 » Wed Dec 23, 2015 9:27 pm
update. pulled up the map on my ipad and it shows all the images apparently there is an incompatibility with IE 11.
JR
hsmith
Agent Smith
Posts: 3539 Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:
Post
by hsmith » Mon Dec 28, 2015 11:25 am
Have you tried FireFox / Chrome?
Former Nagios Employee.
me.