Monday, March 25, 2024

Learn a little about NAGIOS folder structure

 


------------------------------------------------------------

CHECK YOUR FOLDERS TO KNOW YOUR NAGIOS
    cd /usr/local/nagios/
    ls -la
    
        bin - principal nagios program folder
        libexec - base plugin folder
        etc - all base configuration
        share + sbin - administration interface elements
        var - variables simply
        rw - nagios pipe

------------------------------------------------------------


CREATE OUR OWN CONFIG REPERTOIR:
    # you can give any name to it; mine is nag_test_conf
    cd /usr/local/nagios/
    mkdir nag_test_conf
    
ADD THIS REPERTOIR TO NAGIOS.CFG:
    # when nagios starts, it will run this folder and its .cfg files
    # this is where we will put our own configs
    
    nano /usr/local/nagios/etc/config.cfg
        # go to the end of the file and add this line

        # COMMENT: DIR -> CONFIG nag_test_conf
        cfg_dir=/usr/local/nagios/nag_test_conf
        
        or
        
        echo "#CONFIG nag_test_conf" >> /usr/local/nagios/etc/nagios.cfg
        echo "cfg_dir=/usr/local/nagios/nag_test_conf" >> /usr/local/nagios/etc/nagios.cfg
        

------------------------------------------------------------

Use nagios learning tools on their websites to better understand what is going on in case of it's internal structure. Later on if you worked seriously with nagios, you'll thank for the knowledge. Migrating, securitizing, virtual hosting, external plugins and so on are not that easy, except if you knew where to look for the info. 

What you can also do is use an internal private ai and feed the entire nagios documentation to it, so you can have all the answers you needed in just a matter of seconds, anytime, with no internet needed. 

_dnhyper

No comments:

Post a Comment

Change mailbox language #Outlook #Exchange

 Exchange online had a bug for a couple of weeks, that many of our shared mailboxes came up english, despite that clients outlook is french,...