From owner-freebsd-questions@freebsd.org Wed Sep 21 10:12:06 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1C2D7BE3A25 for ; Wed, 21 Sep 2016 10:12:06 +0000 (UTC) (envelope-from alnis.morics@gmail.com) Received: from mail-lf0-x234.google.com (mail-lf0-x234.google.com [IPv6:2a00:1450:4010:c07::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 94B62DCC for ; Wed, 21 Sep 2016 10:12:05 +0000 (UTC) (envelope-from alnis.morics@gmail.com) Received: by mail-lf0-x234.google.com with SMTP id g62so36202281lfe.3 for ; Wed, 21 Sep 2016 03:12:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:subject:to:message-id:date:user-agent:mime-version :content-transfer-encoding; bh=QxD31EWZvvgkUi9o+Ep8w8ytlmszYdFK4IdhLJbCPpg=; b=AZ5tQYtuZCeEu9k1LgA5ScHCv7hAGmQv0FdcaqExM81wegrcwL3O9J5xLcB4871nEr BueKA82AD89Dd9Mg28Q2pYP6tCIp86mlvPr8LqWXAueWqhgb291Fr53D0epb6QFvDNaz DICyoSHHjMmyUuZAYix9a1/dU9L9F12aToqhhbpjiCWMKiP1WoAwGrwgWTmnJy2qJm2Z 1s94nzFPscbgxoHmx0wFleWrNRgB5G8zuBhcCRbpjmJky+HlpShPhcCDwIXfq/PXH0cq 2g6X8tPsH3M15U2ZuSwym6oe40w/lMciq+RuOFyEDZwqfoyMDHSIguMqQYQoroqy2nRn k+ig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:subject:to:message-id:date:user-agent :mime-version:content-transfer-encoding; bh=QxD31EWZvvgkUi9o+Ep8w8ytlmszYdFK4IdhLJbCPpg=; b=GbMja+9j+rgqQyk/dt9lCEMn8fJocaiODZgqLKTkHJ70hvCYEdUzOr4FofZnkl/dDt Ybb9JfWRuIf4pdWi2WMjPyjtBSgVEbEBPCXA0VTSEMc3Yni8N74euQgxPgaAjMNceNpe TuXnruMXZ6VpCuPRjqM9UuLTtrDS8ATRNKwq7N7jyZkR+YVCLzYjkJZ22I+a0M0adrS+ J/FfYDu/uX29n4sUYV4V8DHN7QihBGqFm1s8FHOYvF037yELoQfP2kKSDxxjNH0zwAk1 T46ZCEcMRq7pDP2PqC4VkkaBNQxIka9WimNeR3YQ/57h98rhpII1Ft6E9nEoDmm6bLMv zdLA== X-Gm-Message-State: AE9vXwNzrocCVFkdilSYN2FhxxQXNnsWVhf/tE+Z5gFQZOXAjkOkNKOqK/bENXSZr1H/JQ== X-Received: by 10.25.134.131 with SMTP id i125mr12508073lfd.15.1474452723504; Wed, 21 Sep 2016 03:12:03 -0700 (PDT) Received: from [192.168.0.192] ([78.84.246.3]) by smtp.gmail.com with ESMTPSA id e3sm6617536lji.31.2016.09.21.03.12.02 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Sep 2016 03:12:03 -0700 (PDT) From: Alnis Morics Subject: Re:Nagios reports its own host as DOWN To: freebsd-questions@freebsd.org Message-ID: <1b3e0d30-440d-012e-a6f3-75cd1abeeaff@gmail.com> Date: Wed, 21 Sep 2016 13:12:02 +0300 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:45.0) Gecko/20100101 Icedove/45.2.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 10:12:06 -0000 >Hi, > >I installed nagios4-4.1.1_5,1 on a FreeBSD 10.3 jail. (It's my first >time with Nagios) > >I managed the core to show up as working, and the system now lists its >first host (the one it is installed on) -- as DOWN. > >Small wander, because the way it checks this is by pinging "localhost" >(/sbin/ping -n -c 5 127.0.0.1 ), although ping is disabled in my jail >(as per default), and its localhost address is changed to 127.0.0.3. > >How can I correct this checking? I found there is a script for checking >FreeBSD jails >(https://exchange.nagios.org/components/com_mtree/attachment.php?link_id=1859&cf_id=24) >but, again, I can't find any hint of how to use it or whether it can >help me at all. Will I be able to check services on jails of other >machines? > >Thanks for any advice, > >-Alnis Ok, sorted out by myself, sorry for the noise. 1. Although I already changed the localhost's address in /etc/hosts on the jail, Nagios doesn't respect it. It needs the address defined at /usr/local/etc/nagios/objects/localhost.cfg. 2. If I'm going to use this jail as a Nagios host, I'll need the ping enabled anyway for checking other hosts, so I enabled it. Now the Nagios host appears as UP. -Alnis