Page 1 of 1
NagVis Installation
Posted: Sun Feb 12, 2012 8:13 am
by mikew
Nagios provides a script for the installation of NagVis, which is a great tool by the way. The script is located here:
http://assets.nagios.com/downloads/nagi ... -Nagvis.sh
If you want the latest version, change two lines listed below. Note you have to change two lines as the last time the script was updated was for version 1.5.x and now the wget line needs to be changed to make it all work.
Code: Select all
NAGVIS_VER="1.6.3"
wget -qc "http://sourceforge.net/projects/nagvis/files/NagVis%201.6/nagvis-$NAGVIS_VER.tar.gz/download"
I have installed this application manually on quite a few Nagios servers and it is surely much easier to use the script.
Thanks Nagios team for making it available.
Re: NagVis Installation
Posted: Sun Feb 12, 2012 9:43 am
by mikew
One other thing that I found is when you use NagVis 1.6.3 it authenticates differently so you have to make a few modifications. The script uses the nagiosadmin user and password from Nagios XI, so you can login but you have read writes only. This can be fixed by using a script to give the nagiosadmin user full writes.
Access the script here:
http://nagvis.git.sourceforge.net/git/g ... ads/master
Go to /usr/local/nagvis/etc/ and create a script by creating a file make_admin.sh and dropping the script code that you found at the link into the file.
Then make the script executable and execute it for the nagiosadmin user:
Code: Select all
chmod 755 make_admin.sh
./make_admin.sh nagiosadmin
Now you have the latest version of NagVis and the permissions are correct.
Re: NagVis Installation - Fixing Images
Posted: Sun Feb 12, 2012 7:57 pm
by mikew
NagVis 1.6.3 does have a bug that prevents you from images showing, but there is a bug fix.
Images do not show when you add them. This is a bug that can be fixed with the following code by editing this file:
/usr/local/nagvis/share/server/core/classes/objects/NagVisShape.php
Old Settings
Code: Select all
public function __construct($CORE, $icon) {
if(parent::$iconPath === null) {
parent::$iconPath = cfg('sys', 'global', 'shapes');
parent::$iconPathLocal = cfg('sys', 'local', 'shapes');
}
public function fetchIcon() {
if($this->icon[0] != '[') {
if(!file_exists(parent::$iconPath . $this->icon)
&& !file_exists(parent::$iconPathLocal . $this->icon)) {
$this->icon = 'std_dummy.png';
}
New Settings
Code: Select all
public function __construct($CORE, $icon) {
if(self::$iconPath === null) {
self::$iconPath = $CORE->getMainCfg()->getPath('sys', 'global', 'shapes');
self::$iconPathLocal = $CORE->getMainCfg()->getPath('sys', 'local', 'shapes');
}
public function fetchIcon() {
if($this->icon[0] != '[') {
if(!file_exists(self::$iconPath . $this->icon)
&& !file_exists(self::$iconPathLocal . $this->icon)) {
$this->icon = 'std_dummy.png';
}