Memasang Nagmap Plugin di Nagios Core

Bismillah ,…

hari ini insyaallah saya akan sedikit menjelaskan cara memasang nagmap nagios plugin kedalam NagiosCore , saya menggunakan Version 4.0.8 berjalan di Ubuntu 14.04 Lts , ok  ..

saya anggap nagios sudah running dan kita sudah menambahkan host dan service untuk di monitoring,

pertama kita download dulu plugin nag map nya , bisa di web ini [ Nagmap 1.0 ]  untuk versi update nya ada di sini https://github.com/hecko/nagmap


root@serveraldy:/# cd /var/www/html/
root@serveraldy:/var/www/html# wget aldy.alshifacharity.com/wp-content/uploads/2016/08/nagmap-1.0.tar.gz
--2016-08-11 17:40:02-- https://aldykustyandi.com/wp-content/uploads/2016/08/nagmap-1.0.tar.gz
Resolving aldy.alshifacharity.com (aldy.alshifacharity.com)... 192.168.222.227
Connecting to aldy.alshifacharity.com (aldy.alshifacharity.com)|192.168.222.227|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 9584 (9,4K) [application/x-gzip]
Saving to: ‘nagmap-1.0.tar.gz’
100%[=====================================================================================================================>] 9.584 --.-K/s in 0s
2016-08-11 17:40:02 (37,1 MB/s) - ‘nagmap-1.0.tar.gz’ saved [9584/9584]

 

kemudian ekstrak


root@serveraldy:/var/www/html# tar -xvzf nagmap-0.11.tar.gz
root@serveraldy:/var/www/html# ls
nagmap nagmap-1.0.tar.gz
root@serveraldy:/var/www/html#

edit config.php


root@serveraldy:/var/www/html# pico nagmap/
call.php config.php favicon.ico index.php marker.php nagios_cfg.php status.php THANKS 
CHANGELOG debug.php functions.php INSTALL moire.php README style.css 
root@serveraldy:/var/www/html# pico nagmap/config.php

silahkan ikuti petunjuk nya dan sesuaikan

Screenshot from 2016-08-11 19-40-53

save  dengan Ctrl + x kemudian  Y  terus Enter

terakhir kita tambahkan host yang akan di mark ke Map , misal seperti berikut :


root@serveraldy:/var/www/html# pico /usr/local/nagios/etc/switch/switch.cfg

Screenshot from 2016-08-15 16-49-02

sampai sini map sudah bisa di akses lewat browser di http://ipserver/nagmap  , yang kurang lebih tampilan nya sperti berikut

Screenshot from 2016-08-11 19-57-45

terakhir ,  kita coba tambahkan menu Nagmap di site nagios ,   edit halaman side.php kemudian tambahkan beberapa baris html code


root@serveraldy:~# locate side.php
/root/nagios-4.0.8/html/side.php
/usr/local/nagios/share/side.php
/usr/share/nagios3/htdocs/side.php
root@serveraldy:~# pico /usr/local/nagios/share/side.php

Screenshot from 2016-08-11 20-03-42

sesuaikan ip dengan server anda , save dan test…

Screenshot from 2016-08-11 20-07-33

referensi :

https://github.com/hecko/nagmap

http://ardnetwork.com/wpmu/blog/integration-nagios-with-nagmap/

http://www.linuxscrew.com/2012/07/02/nagios-map-geolocation/

9 Comments

  1. ngeng lalalaMay 5, 2017 at 6:00 PM

    berro gw masih belom pafahm gimana cara menmabhkan host ke nagmap??
    bisa tolong pencerahannya/… terima kasih

    best regard

    Reply
    • aldykustyandiMay 11, 2017 at 8:52 AM

      icon_image 3com-2.gif
      icon_image_alt 3com-2.gif
      vrml_image 3com-2.gif
      parents Mikrotik-Main-Router
      }

      define service{
      use generic-service ; Inherit values from a template
      host_name Switch-Manageable-Ruang-Server ; The name of the host the serv$
      service_description PING ; The service description
      check_command check_ping!200.0,20%!600.0,60% ; The command u$
      normal_check_interval 5 ; Check the service every 5 min$
      retry_check_interval 1 ; Re-check the service every mi$
      notifications_enabled 1
      notes latlng: -6.655070, 107.721388
      register 1
      # parents Mikrotik-Main-Router
      }

      setingan nya di notes latlng: titik-kotrdinst-nya lihat di map

      Reply
  2. gw pengen nanya, untuk menambahkan host di nagmap caranya gimana????
    gw coba memasukkan notes latlt ke masing host2 tapi di nagmapnya engga keluar keluar…

    Reply
    • aldykustyandiMay 11, 2017 at 8:57 AM

      coba cek lagi mas , syntax nya notes latlng: bukan notes latlt: dan perhatikan untuk fromat kordiant nya, mudah mudahan bisa mebantu terimakaasih

      Reply
      • host.cfg
        define host{
        use linux-server,host-pnp
        host_name localhost
        alias localhost
        address 127.0.0.1
        notes latlng: -6.239303, 106.812571
        notification_interval 30
        }
        services.cfg
        define service{
        use local-service,nagiosgraph,service-pnp
        host_name localhost
        service_description PING
        check_command check_ping!100.0,20%!500.0,60%
        contact_groups admins,INFRA
        notification_interval 45
        }

        itu contoh host.cfg dan services.cfg, gw bingung apakah perlu dijadikan parent atau untuk menambahkan host di nagmap dimasukkan di “define host” ??? dan sekarang gw mengalami kendala dimana ketika membuka nagmap di browser nagmapnya blank white screen gitu.. yang dimana gw sama sekali kaga ngotak ngatik kecuali nambahin host yang tak kunjung muncul di nagmap..

        Reply
        • aldykustyandiMay 19, 2017 at 7:54 AM

          wah blank , sudah ada php ny ka yah ,. atau versi berapa php nya ..? kalo di server yang running di tutorial ini pake 5.5
          root@serveraldy:~# php -v
          PHP 5.5.9-1ubuntu4.21 (cli) (built: Feb 9 2017 20:54:58)
          Copyright (c) 1997-2014 The PHP Group
          Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
          with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies
          root@serveraldy:~#

          kalo php emang sensitif untuk antara versi dengan syntax nya , nagmap soal nya pake php

          Reply
        • aldykustyandiMay 19, 2017 at 8:00 AM

          sama coba mas,notes latlng tambahin nya di service.cfg nya mas , misal di dalem tag define service misal yang service ping , nah ditambah kan nya kya di bawah ini, di tambh register 1

          notes latlng: -6.655070, 107.721388
          register 1

          Reply
  3. nah itu masalahnya, host.cfg dan service.cfg gw pisah..

    gw sendiri pun udah ngecek versi phpnya dan sama kaya agan, cek spasi yang kebanyakan ataupun angka di notes latlng yang kebanyakan juga..

    menurut lu, kalo nagmap gw apus lalu di copy lagi, apakah dengan itu bias solved ya??

    best regard

    Reply
    • aldykustyandiJune 12, 2017 at 11:26 AM

      Nagios nya di postingan ni nagios core Version 4.0.8 gan, tapi harus nya tidak jauh beda untuk pemasangan plugin nya, langkah yang ini –>
      sama coba mas,notes latlng tambahin nya di service.cfg nya mas , misal di dalem tag define service misal yang service ping , nah ditambah kan nya kya di bawah ini, di tambh register 1

      notes latlng: -6.655070, 107.721388
      register 1

      sudah di coba …?

      Reply

Leave a Reply to aldykustyandi Cancel reply

Your email address will not be published.

Time limit is exhausted. Please reload CAPTCHA.