how to simulate network device outage ?

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.
Locked
nagmoto
Posts: 195
Joined: Fri Jan 09, 2015 8:05 am

how to simulate network device outage ?

Post by nagmoto »

It is hard to bring down production router, so I want to do a network router device outage simulation, to see how nagios 4.1.1 server's dashboard showing status.

Plan is to have a regular server ip 192.168.1.1/2 set as router devices and have 192.168.1.3 declare both as parents IP.
Things I don't understand is how show I define host 192.168.1.1 and 192.168.1.2 as router devices ?
I want to see network outage happened on dashboard by bring down test machines 192.168.1.1/2.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: how to simulate network device outage ?

Post by ssax »

The outages are based on the parent relationships, please read here for more information:

https://assets.nagios.com/downloads/nag ... ility.html

So you set all the parents up properly and then when a parent goes down everything else behind it will go into unknown/unreachable state.

To test an outage, just click on the host and then click the Submit passive check result for this host and submit a down results, this should do what you're looking for in terms of faking an outage.


Thank you
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: how to simulate network device outage ?

Post by ssax »

What I mean by that is you don't specify them as router devices, just as parents, the parent option is what controls it.
nagmoto
Posts: 195
Joined: Fri Jan 09, 2015 8:05 am

Re: how to simulate network device outage ?

Post by nagmoto »

Thanks for the pointer.
This is on a CentOS 7.3 with httpd(apache).

1. Submit passive check result for router host(xxx.xxx.222.254)
2. Select "Down" for Check Result
3. Enter "testing router outage" for Check Output filed
4. Commit
5. This down status will be valid for about 5 minutes(?) and will be reset to UP.
6. We should be able to see this picture(outage-simulation.png)
network outage picture
network outage picture
6.1 from https://nagios03.test.com/nagios/cgi-bin/outages.cgi
6.2 it report 3 devices got impacted, two other devices and this device.
7. When click on 3rd icon from the left to see 3D map and its impacted childs
My Chrome browser download as a file.
statuswrl.cgi got downloaded as file
statuswrl.cgi got downloaded as file
statuswrl.cgi.png (2.65 KiB) Viewed 3315 times
8. Looks I have a httpd cgi configuration issue for 3D wrl file

Sorry, Another question. Do you know where is the doc I can see to configure 3D wrl cgi properly ?

Here is more information, other *.cgi are working fine except this one.
So this is not a cgi-bin path declaration issue in apache.

9. found this thread http://www.phppop.net/node/243
I install this one https://chrome.google.com/webstore/deta ... lcao?hl=en
restart Chrome and still getting same issue, statuswrl.cgi got downloaded.
nagmoto
Posts: 195
Joined: Fri Jan 09, 2015 8:05 am

Re: how to simulate network device outage ?

Post by nagmoto »

Hi ssax
Do you have working setup in your test lab to allow statuswrl.cgi to display map ?
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: how to simulate network device outage ?

Post by dwhitfield »

What's the output of the following command (example output included)?

Code: Select all

root@localhost:~# ls -la /usr/local/nagios/sbin/
total 5852
drwxrwsr-x 2 nagios nagios   4096 Feb 22 12:49 .
drwxr-sr-x 9 nagios nagios   4096 Nov 30 10:37 ..
-rwxrwxr-x 1 nagios nagios 353552 Feb 22 12:49 archivejson.cgi
-rwxrwxr-x 1 nagios nagios 342080 Feb 22 12:49 avail.cgi
-rwxrwxr-x 1 nagios nagios 335136 Feb 22 12:49 cmd.cgi
-rwxrwxr-x 1 nagios nagios 313340 Feb 22 12:49 config.cgi
-rwxrwxr-x 1 nagios nagios 359160 Feb 22 12:49 extinfo.cgi
-rwxrwxr-x 1 nagios nagios 301724 Feb 22 12:49 histogram.cgi
-rwxrwxr-x 1 nagios nagios 281212 Feb 22 12:49 history.cgi
-rwxrwxr-x 1 nagios nagios 280596 Feb 22 12:49 notifications.cgi
-rwxrwxr-x 1 nagios nagios 352272 Feb 22 12:49 objectjson.cgi
-rwxrwxr-x 1 nagios nagios 272384 Feb 22 12:49 outages.cgi
-rwxrwxr-x 1 nagios nagios 276492 Feb 22 12:49 showlog.cgi
-rwxrwxr-x 1 nagios nagios 358460 Feb 22 12:49 status.cgi
-rwxrwxr-x 1 nagios nagios 347376 Feb 22 12:49 statusjson.cgi
-rwxrwxr-x 1 nagios nagios 301244 Feb 22 12:49 statusmap.cgi
-rwxrwxr-x 1 nagios nagios 293980 Feb 22 12:49 statuswml.cgi
-rwxrwxr-x 1 nagios nagios 277472 Feb 22 12:49 statuswrl.cgi
-rwxrwxr-x 1 nagios nagios 301128 Feb 22 12:49 summary.cgi
-rwxrwxr-x 1 nagios nagios 292952 Feb 22 12:49 tac.cgi
-rwxrwxr-x 1 nagios nagios 309416 Feb 22 12:49 trends.cgi
nagmoto
Posts: 195
Joined: Fri Jan 09, 2015 8:05 am

Re: how to simulate network device outage ?

Post by nagmoto »

Code: Select all

[me@nagios01 ~]# ls -la /usr/lib64/nagios/cgi/
total 7292
drwxr-xr-x 2 root root   4096 May 25  2016 .
drwxr-xr-x 5 root root   4096 May 25  2016 ..
-rwxrwxr-x 1 root root 389800 May 10  2016 archivejson.cgi
-rwxrwxr-x 1 root root 378168 May 10  2016 avail.cgi
-rwxrwxr-x 1 root root 355824 May 10  2016 cmd.cgi
-rwxrwxr-x 1 root root 332864 May 10  2016 config.cgi
-rwxrwxr-x 1 root root 373896 May 10  2016 extinfo.cgi
-rwxrwxr-x 1 root root 328856 May 10  2016 histogram.cgi
-rwxrwxr-x 1 root root 304112 May 10  2016 history.cgi
-rwxrwxr-x 1 root root 299864 May 10  2016 notifications.cgi
-rwxrwxr-x 1 root root 391456 May 10  2016 objectjson.cgi
-rwxrwxr-x 1 root root 295864 May 10  2016 outages.cgi
-rwxrwxr-x 1 root root 295808 May 10  2016 showlog.cgi
-rwxrwxr-x 1 root root 990165 May 25  2016 status2.cgi
-rwxrwxr-x 1 root root 374064 May 10  2016 status.cgi
-rwxrwxr-x 1 root root 389120 May 10  2016 statusjson.cgi
-rwxrwxr-x 1 root root 325168 May 10  2016 statusmap.cgi
-rwxrwxr-x 1 root root 312392 May 10  2016 statuswml.cgi
-rwxrwxr-x 1 root root 300168 May 10  2016 statuswrl.cgi
-rwxrwxr-x 1 root root 324872 May 10  2016 summary.cgi
-rwxrwxr-x 1 root root 312312 May 10  2016 tac.cgi
-rwxrwxr-x 1 root root 333072 May 10  2016 trends.cgi
[me@nagios01 ~]# 

avandemore
Posts: 1597
Joined: Tue Sep 27, 2016 4:57 pm

Re: how to simulate network device outage ?

Post by avandemore »

Please run the following:

Code: Select all

# tar czvf /tmp/http.tar.gz /etc/httpd/ /var/log/httpd/
Please provide the file /tmp/http.tar.gz
Previous Nagios employee
nagmoto
Posts: 195
Joined: Fri Jan 09, 2015 8:05 am

Re: how to simulate network device outage ?

Post by nagmoto »

how do I submit httpd config and log direct to you in private ?
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: how to simulate network device outage ?

Post by dwhitfield »

@nagmoto, there is a PM button over on the right. You can send it to any of the techs. If it is too large, then you could email it, but I doubt that in this case.
Locked