www.nagvis.org

功能:

Display of single Hosts and Services
Visualize a complete Host- or Servicegroup with one icon
Display the summary state of a Host and all its services
Display only the real problems
Sub-map icons which represent a complete NagVis Map in one icon (drill down)
Visualization of complete IT processes using self drawn graphics
Online documentation of IT environments including current states
Visualisation of network traffic using weathermap lines
Multilingual capabilities
Web configuration interface (WUI)

需求:

NDoutils : 因為 nagvis 需要讀取資料庫,正好搭配 ndoutils 可以將 nagios 的資料、狀態都寫在資料庫裡

需求套件:

yum install php-gettext php-session php-json php-pdo php-gd php-mbstring

yum install graphviz*

安裝 NagVis

下載: http://www.nagvis.org/downloads 的 nagvis-1.5.9.tar.gz

解開後裡面有個 install.sh ,直接執行它

+——————————————————————————+
| Welcome to NagVis Installer 0.2.17                                           |
+——————————————————————————+
| This script is built to facilitate the NagVis installation and update        |
| procedure for you. The installer has been tested on the following systems:   |
| – Debian Etch, Hardy (4.0, 5.0)                                              |
| – Ubuntu Hardy, Intrepid, Jaunty, Karmic, Lucid (8.04 to 10.04)              |
| – SuSE Linux Enterprise Server 10 and 11                                     |
|                                                                              |
| Similar distributions to the ones mentioned above should work as well.       |
| That (hopefully) includes RedHat, Fedora, CentOS, OpenSuSE                   |
|                                                                              |
| If you experience any problems using these or other distributions, please    |
| report that to the NagVis team.                                              |
+——————————————————————————+
| Do you want to proceed? [y]:enter
+——————————————————————————+
| Starting installation of NagVis 1.5.9                                        |
+——————————————————————————+
| OS  : Fedora release 12 (Constantine)                                        |
| Perl: 5.010000                                                               |
|                                                                              |
+— Checking for tools ——————————————————-+
| Using packet manager /bin/rpm                                          found |
|                                                                              |
+— Checking paths ———————————————————–+
| Please enter the path to the nagios base directory [/usr/sbin/nagios]: /etc/nagios
|   nagios path /etc/nagios                                              found |
| Please enter the path to NagVis base [/usr/sbin/nagvis]: /etc/nagvis
|                                                                              |
+— Checking prerequisites —————————————————+
| nagios binary                                                        MISSING |
| PHP 5.3                                                                found |
|   PHP Module: gd php                                                   found |
|   PHP Module: mbstring php                                             found |
|   PHP Module: gettext php                                              found |
|   PHP Module: session compiled_in                                      found |
|   PHP Module: xml compiled_in                                          found |
|   Apache mod_php                                                       found |
| Checking Backends. (Available: mklivestatus,ndo2db,ido2db,merlinmy)          |
| Do you want to use backend mklivestatus? [y]: n
| Do you want to use backend ndo2db? [n]: y
| Do you want to use backend ido2db? [n]: n
| Do you want to use backend merlinmy? [n]: n
|   NDO Module ndo2db (ndo2db)                                         MISSING |
|   PHP Module: mysql php                                                found |
| Graphviz 2.20                                                          found |
|   Graphviz Module dot 2.20.3                                           found |
|   Graphviz Module neato 2.20.3                                         found |
|   Graphviz Module twopi 2.20.3                                         found |
|   Graphviz Module circo 2.20.3                                         found |
|   Graphviz Module fdp 2.20.3                                           found |
|                                                                              |
+— Trying to detect Apache settings —————————————–+
| Please enter the web path to NagVis [/nagvis]:enter
| Please enter the name of the web-server user [apache]:enter
| Please enter the name of the web-server group [apache]:enter
| create Apache config file [y]:enter
|                                                                              |
+— Checking for existing NagVis ———————————————+
|                                                                              |
+——————————————————————————+
| Summary                                                                      |
+——————————————————————————+
| NagVis home will be:           /etc/nagvis                                   |
| Owner of NagVis files will be: apache                                        |
| Group of NagVis files will be: apache                                        |
| Path to Apache config dir is:  /etc/httpd/conf.d                             |
| Apache config will be created: yes                                           |
|                                                                              |
| Installation mode:             install                                       |
|                                                                              |
| Do you really want to continue? [y]:enter
+——————————————————————————+
| Starting installation                                                        |
+——————————————————————————+
| Creating directory /etc/nagvis…                                      done  |
| Creating directory /etc/nagvis/var…                                  done  |
| Creating directory /etc/nagvis/var/tmpl/cache…                       done  |
| Creating directory /etc/nagvis/var/tmpl/compile…                     done  |
| Creating directory /etc/nagvis/share/var…                            done  |
| Copying files to /etc/nagvis…                                        done  |
| Creating main configuration file…                                    done  |
| adding base=”/etc/nagvis”                                              done  |
| setting backend to ndomy_1                                             done  |
| Creating web configuration file…                                     done  |
| Setting permissions for web configuration file…                      done  |
|                                                                              |
|                                                                              |
|                                                                              |
+— Setting permissions… —————————————————+
| /etc/nagvis/etc/nagvis.ini.php-sample                                  done  |
| /etc/nagvis/etc                                                        done  |
| /etc/nagvis/etc/maps                                                   done  |
| /etc/nagvis/etc/maps/*                                                 done  |
| /etc/nagvis/etc/automaps                                               done  |
| /etc/nagvis/etc/automaps/*                                             done  |
| /etc/nagvis/share/userfiles/images/maps                                done  |
| /etc/nagvis/share/userfiles/images/maps/*                              done  |
| /etc/nagvis/share/userfiles/images/shapes                              done  |
| /etc/nagvis/share/userfiles/images/shapes/*                            done  |
| /etc/nagvis/var                                                        done  |
| /etc/nagvis/var/*                                                      done  |
| /etc/nagvis/var/tmpl                                                   done  |
| /etc/nagvis/var/tmpl/cache                                             done  |
| /etc/nagvis/var/tmpl/compile                                           done  |
| /etc/nagvis/share/var                                                  done  |
|                                                                              |
+——————————————————————————+
| Installation complete                                                        |
|                                                                              |
| You can safely remove this source directory.                                 |
|                                                                              |
| For later update/upgrade you may use this command to have a faster update:   |
# 可以用於下次 update時,快速的指令
| ./install.sh -n /etc/nagios -p /etc/nagvis -B  -b ndo2db -u apache -g apache -w /etc/httpd/conf.d -a y
|                                                                              |
| What to do next?                                                             |
| – Read the documentation                                                     |
| – Maybe you want to edit the main configuration file?                        |
|   Its location is: /etc/nagvis/etc/nagvis.ini.php                            |
| – Configure NagVis via browser                                               |
|   <http://localhost/nagvis/config.php>                                       |
| – Initial admin credentials:                                                 |
|     Username: nagiosadmin                                                    |
|     Password: nagiosadmin                                                    |
+——————————————————————————+

設定存取 ndo 資料庫:

編輯 /etc/nagvis/etc/nagvis.ini.php

[backend_ndomy_1]
backendtype=”ndomy”
dbhost=”localhost”
dbport=3306
dbname=”nagios”
dbuser=”nagios”
dbpass=”nagios”
dbprefix=”nagios_”
dbinstancename=”default”
maxtimewithoutupdate=180
htmlcgi=”/nagios/cgi-bin”

登入管理介面:

連結: http://ip/nagvis
帳號: nagiosadmin
密碼: nagiosadmin

如果在介面上看到綠色正方形打勾框的話,應該就是成功連到 ndo 的資料庫了

Related posts 相關文章
使用 Grafana 與 Prometheus 監控主機
More...
簡單容易自己架設的監控平台-Uptime Kuma
More...
監控系統 icinga (nagios 的分支) 安裝 icinga-web 時遇到 500 internal server error
More...
監控系統 icinga (nagios 的分支) Q&A 篇
More...

作者

留言

撰寫回覆或留言

發佈留言必須填寫的電子郵件地址不會公開。