OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • Archive »
  • 17.7 Legacy Series »
  • [SOLVED] Enabling nrpe
« previous next »
  • Print
Pages: [1]

Author Topic: [SOLVED] Enabling nrpe  (Read 4924 times)

whitwye

  • Jr. Member
  • **
  • Posts: 92
  • Karma: 3
    • View Profile
[SOLVED] Enabling nrpe
« on: August 08, 2017, 10:02:30 pm »
SInce we use Nagios extensively to track system health, I'm getting nrpe going. It's a fine thing to see so many packages available, especially after trying pfSense, which has cut itself off from standard FreeBSD packages! (Yes, pfSense has nrpe as part of it, but the interface page for it is crude.)

The pkg installation presents this message:
Quote
**********************************************************************

 Enable NRPE in /etc/rc.conf with the following line:

   nrpe2_enable="YES"

 A sample configuration is available in /usr/local/etc/nrpe.cfg.sample.
 Copy to nrpe.cfg where required and edit to suit your needs.

**********************************************************************

What's the equivalent thing to do on OPNsense, which lacks the /etc/rc.conf file? Create /etc/rc.conf? Add that to /etc/defaults/rc.conf? It looks from this like maybe /etc/rc.conf is required:

Quote
root@OPNsense:/usr/local/etc/rc.d # more nrpe2
#!/bin/sh

# $FreeBSD$
#
# PROVIDE: nrpe2
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to enable nrpe2:
# nrpe2_enable (bool):    Set to "NO" by default.
#                         Set it to "YES" to enable nrpe2.
# nrpe2_flags (str):      Not set by default.
# nrpe2_configfile (str): Set to "/usr/local/etc/nrpe.cfg" by default.
...

Is there a doc page somewhere that covers running available FreeBSD packages on OPNsense?
« Last Edit: August 10, 2017, 04:11:19 pm by franco »
Logged

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 13929
  • Karma: 1208
    • View Profile
Re: Enabling nrpe
« Reply #1 on: August 09, 2017, 08:04:58 am »
We've written a bit of glue that makes it possible to use the packages like FreeBSD mandates.

Create /etc/rc.conf and/or /etc/rc.conf.local to add your variables for services from packages. They should auto-start on the next boot.


Cheers,
Franco
Logged

whitwye

  • Jr. Member
  • **
  • Posts: 92
  • Karma: 3
    • View Profile
Re: Enabling nrpe
« Reply #2 on: August 09, 2017, 04:16:26 pm »
Lovely. Thanks!

Is there syntax that works for starting and stopping such services without rebooting? For nrpe, for instance, I guess I can "kill -HUP" it when I add to its config, but there must be a more "friendly" command. I wouldn't want to have to bounce the whole system. I'm sure the FreeBSD docs can give me the standard commands to start, stop and reload services. Should those just work, or require rephrasing?
Logged

whitwye

  • Jr. Member
  • **
  • Posts: 92
  • Karma: 3
    • View Profile
Re: Enabling nrpe
« Reply #3 on: August 09, 2017, 04:25:33 pm »
Ah ha! Once in /etc/rc.conf, "service nrpe2 start" works! Perfect.
Logged

  • Print
Pages: [1]
« previous next »
  • OPNsense Forum »
  • Archive »
  • 17.7 Legacy Series »
  • [SOLVED] Enabling nrpe
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2023 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2