Giter Site home page Giter Site logo

freebsd-nagios-jail's Introduction

Nagios checks for FreeBSD jails

The pkg-base-audit.sh script requires security/base-audit

pkg-audit.sh requires ports-mgmt/pkg, which should be on every system using pkg.

I used these settings in /etc/periodic.conf:

# for security/405.pkg-base-audit
security_status_baseaudit_enable="YES"
security_status_baseaudit_jails="*"

# for 410.pkg-audit
security_status_pkgaudit_expiry=1

# for many scripts including 405 & 410
pkg_jails='*'

I install pkg-audit.sh and pkg-base-audit.sh at /usr/local/libexec/nagios-custom

I add these entries to /usr/local/etc/nrpe.cfg

$ grep audit /usr/local/etc/nrpe.cfg
command[check_pkg_audit]    =/usr/local/bin/sudo /usr/local/libexec/nagios-custom/pkg-audit.sh
command[check_base_audit]   =/usr/local/bin/sudo /usr/local/libexec/nagios-custom/pkg-base-audit.sh

I add these entries via sudo:

$ sudo grep audit /usr/local/etc/sudoers
nagios   ALL=(ALL) NOPASSWD:/usr/local/libexec/nagios-custom/pkg-audit.sh
nagios   ALL=(ALL) NOPASSWD:/usr/local/libexec/nagios-custom/pkg-base-audit.sh

These services are defined in /usr/local/etc/services.cfg:

define service {
        #NAGIOSQL_CONFIG_NAME           FreeBSD_Server
        hostgroup_name                  FreeBSD Server
        service_description             base audit
        use                             remote_service_timeout
        check_command                   check_nrpe_timeout!check_base_audit!240
        check_interval                  30
        retry_interval                  5
        notification_interval           1440
        contact_groups                  admins
        register                        1
}

define service {
        #NAGIOSQL_CONFIG_NAME           FreeBSD_Server
        hostgroup_name                  FreeBSD Server
        service_description             pkg audit
        use                             remote_service_timeout
        check_command                   check_nrpe_timeout!check_pkg_audit!240
        check_interval                  30
        retry_interval                  5
        notification_interval           1440
        contact_groups                  admins
        register                        1
}

freebsd-nagios-jail's People

Contributors

dlangille avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.