How to make Indirect checks

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.
ziedmahjoub
Posts: 142
Joined: Fri Jan 16, 2015 5:22 am

Re: How to make Indirect checks

Post by ziedmahjoub »

Now i need for the other scripts to check like check_disk_indirect !!
the script for checking disk space is included or i need to make it ?
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: How to make Indirect checks

Post by jdalrymple »

So ziedmahjoub - the actual command required is going to be on the indirect host once you install nsclient++. The difficult part is getting the intermediate host to speak with that host properly, and to compound the problem you're on a version of nsclient that's very poorly documented. I suggest following Box293's instructions and if they don't help get your 3rd host properly in the mix let us know.
ziedmahjoub
Posts: 142
Joined: Fri Jan 16, 2015 5:22 am

Re: How to make Indirect checks

Post by ziedmahjoub »

Referring to Box instructions ,

You mean that the script check_disk.bat should be in host C right ?
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: How to make Indirect checks

Post by jdalrymple »

check_disk is a builtin component of nsclient++

You only need to install nsclient++ on host C then configure proxying on host B as instructed by Box. You could use an external script like check_disk.bat on host C - it's really not necessary though since it's built right into nsclient++

follow?
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: How to make Indirect checks

Post by Box293 »

I added a section to my guide titled "What About Host Ping Checks???".

This has all the steps required to make Host_B ping Host_C.

Let me know if it works as intended.

http://sites.box293.com/nagios/guides/n ... g/nsclient
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
ziedmahjoub
Posts: 142
Joined: Fri Jan 16, 2015 5:22 am

Re: How to make Indirect checks

Post by ziedmahjoub »

jdalrymple wrote:check_disk is a builtin component of nsclient++

You only need to install nsclient++ on host C then configure proxying on host B as instructed by Box. You could use an external script like check_disk.bat on host C - it's really not necessary though since it's built right into nsclient++

follow?
nice i will try it

i can say its the same for all the other standard checks ? ( memory use , uptime , explorer , CPU )
Last edited by ziedmahjoub on Wed Apr 08, 2015 3:25 am, edited 1 time in total.
ziedmahjoub
Posts: 142
Joined: Fri Jan 16, 2015 5:22 am

Re: How to make Indirect checks

Post by ziedmahjoub »

Box293 wrote:I added a section to my guide titled "What About Host Ping Checks???".

This has all the steps required to make Host_B ping Host_C.

Let me know if it works as intended.

http://sites.box293.com/nagios/guides/n ... g/nsclient
For me , the ping works already with the support of jdalrymple .
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: How to make Indirect checks

Post by jdalrymple »

ziedmahjoub wrote:nice i will try it

i can say its the same for all the other standard checks ? ( memory use , uptime , explorer , CPU )
Correct - let us know how it works.
Also, Box added some notes regarding some bugs in the check_ping.bat script. You MAY want to take a look at them.
ziedmahjoub
Posts: 142
Joined: Fri Jan 16, 2015 5:22 am

Re: How to make Indirect checks

Post by ziedmahjoub »

Can i put a host definitions with 2 check_command , like this for example :

Code: Select all

define host{
        use             windows-server  ; Inherit default values from a template
        host_name       ala_pc      ; The name we're giving to this host
        alias           My Windows ; A longer name associated with the host
        address         192.168.0.100   ; IP address of the host
        check_command   indirect_check_ping
        check_command   indirect_check_disk
        }
my check_disk service still UNKNOWN status like in attachment below
Attachments
UNKNOWN status disk
UNKNOWN status disk
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: How to make Indirect checks

Post by jolson »

You will use a 'service check' to define any check that is not the host check. Two host checks cannot be defined on one host. You can read further about service checks and how to define them here: http://nagios.sourceforge.net/docs/3_0/ ... ml#service

Thanks!
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
Locked