Nagios(FAN) – A Beginners Guide

After Finding and configuring our awesome new IT Ticketing system, I set my sights on upgrading our Server Monitor Solution. Right now we have a Legacy Server Monitor Program that was written by a company that doesn’t exist anymore… While it is still functional and fairly reliable, it is very rigid and it really is starting to show its age.  I wanted to find a solution that was widely known and supported and if possible – Open Source. What I finally settled on was the Free Distribution of Nagios – FAN ( Fully Automated Nagios ).

 

Let me Preface this Nagios Guide by stating that, It is indeed True what they say about Nagios… Super Powerful, But Pain in the ass to setup! I tried for a good while to get Nagwin ( Nagios for Windows ) working in a functional way… And while I was able to setup Nagios core fairly easily, NONE of the front end interfaces were designed for Windows and I simply could not get them to work. Even if I were to figure out how to create the needed configuration Files needed to support Nagios Core, There was no way I was going to go to my Team and say they need to learn how to write config files if they ever want to monitor anything! So at this point I almost gave up on Nagios, Until I stumbled upon a Spiceworks Forum post where somebody recommended Nagios:FAN.

I was still skeptical about using Linux, being almost entirely a Windows shop with very little Linux experience…. but after reading the install directions for Nagios-FAN, my concerns were immediately put to rest. The setup process wasn’t nearly as intimidating as a Nagios Install from Scratch, and in fact after figuring out how to Install FAN as a Virtual Server on our Microsoft Hyper-V 2008 r2 Server – It was as easy as following the install directions.

Now if you are looking for a point and click install that you can get setup inside of an hour…you may want to reconsider Nagios. Nagios is a Powerhouse, but with all the added Horsepower comes a fair deal of complexity ( especially if you don’t know Linux) That being said… It scales incredibly well, I think some companies have it monitoring over 1 MILLION DEVICES. If you still are on the fence about Nagios at this point, maybe it would help if you could see some of the companies that use and trust the product everyday.

Nagios Customers & Users

So_Who_Uses_Nagios

**The Complete Listing Can be Found @  http://www.nagios.com/users

 

Index:

  • System Requirements
  • Installing Nagios-FAN
    • Physical Device Install
    • Hyper-V Install
  • SNMP Host Configuration
  • Centreon Configuration
    • Add a Host
    • CPU Alert
    • Memory Alert
    • Disk Space Alert
    • Service Alert
    • Process Alert
  • Notifications
    • Setup E-mail Notifications
    • Setup SMS Notifications
    • Setup Jabber Notifications
  • Fun with Nagvis
  • Extras
    • Install NSClient++
    • Troubleshooting

     

**If you have a smaller enviorment, you may want to consider checking out my pre-configured NagiosPI image.

 

 

System requirements

Minimum system requirements

  • 4 GB free disk space
  • 1 GB of RAM.
  • 1 processor core

Recommended system requirements

  • 20 GB plus the required disk space recommended essentialy for /var. Disk space needed by mysql and rrd files
  • 2 processors core or hyper-thread for each virtualized CPU.
  • 2 GB of RAM.

Physical Device Install

 

I recommend using the Nagios Fan Documentation Found HERE if you are installing to a physical server.

Hyper-V Install

 

FAN 2.4

1.) Download Fan-Version 2.4

  • i386 = 32 bit OS
  • x86_x64 = 64 bit OS

If you attempt to install the latest version( which at the time of this writing is 2.4 ) of FAN to a Virtualized server in HyperV, you will get half-way through the install – and then you will encounter the following error….

….However this issue will be addressed and resolved  later on in the install process for 2.4.

 

2.)  Once you have downloaded the appropriate .ISO, you will want to Browse to your Virtual Machine and then Select Settings. Then add hardware > Legacy Network Adapter  >  Then click ADD.

Legacy_Network_Adapter_HyperV

 

3.)  You will then Want to Highlight “Legacy Network Adapter” and Then Select the appropriate Network Adapter.

Legacy_Network_Adapter_HyperV_step2

 

4.) Highlight your DVD drive, Then Browse to your FAN-2.2-x86_x64.iso File. Once Selected, Hit Apply.

Mount_NagiosFAN_iso

 

5.) Still Under settings – Select BIOS. Then Make sure that CD is set to boot first.

FAN_Bios

 

6.)  Now Open your Virtual Server, and START it up. You should be greeted by the Nagios-FAN Welcome Screen. Hit the “ENTER” key to begin installation.

**Note: Your mouse WILL NOT work during the install process.

CentOS_LinuxRescue_Boot

 

7.) Select your Language. Then Keyboard Type.

FAN_Setup1

 

8.) If you are working with a Clean Slate on your virtual machine, You can simply Hit Next at this screen to accept the default values. Alternatively if you are overwriting  the contents of an existing Hard drive – I would change this to “Overwrite contents of Hard drive and create default Layout.”

FAN_Setup2

 

9.) Select a Map Region.

FAN_Setup3_Map

 

10.) Set your root password.

FAN_Setup4

 

11.) You will then be prompted to Reboot. Do note remove your CD yet!!

FAN_Setup5

 

12.) When the system Reboots, Boot from CD again. When The FAN Landing Page comes up… type “Linux Rescue“. Then hit “Enter

Fan_SplashBoot

13.)  When prompted – Do not start the network Interfaces.

14.) When you reach the command Line – Type the following:

15.) Upon Typing  “cat /etc/grub.conf” – You will see an output along the following – Make Note of your Kernel Version.

FAN_KernelPanic_Fix_1

16.)  Finally Type the following Command, replacing the version shown in my example with your own!!

***The above command has el5 in it – note that it’s an “L” and not a “1″ before the 5!

 

FAN 2.2

1.) Download Fan-Version 2.2

If you attempt to install the latest version( which at the time of this writing is 2.4 ) of FAN to a Virtualized server in HyperV, you will get half-way through the install – and then you will encounter the following error….

Version 2.3 & 2.4 include a version of CentOS that is missing vital HyperV drivers. Until FAN decides to move onto a Newer version of CentOS – Version 2.2 is the most recent COMPATIBLE version. You can download it HERE.

  • i386 = 32 bit OS
  • x86_x64 = 64 bit OS

***If you are installing this on HyperV, You probably want the 64 bit Version!!

 

2.)  Once you have downloaded the appropriate .ISO, you will want to Browse to your Virtual Machine and then Select Settings. Then add hardware > Legacy Network Adapter  >  Then click ADD.

Legacy_Network_Adapter_HyperV

 

3.)  You will then Want to Highlight “Legacy Network Adapter” and Then Select the appropriate Network Adapter.

Legacy_Network_Adapter_HyperV_step2

 

4.) Highlight your DVD drive, Then Browse to your FAN-2.2-x86_x64.iso File. Once Selected, Hit Apply.

Mount_NagiosFAN_iso

 

5.) Still Under settings – Select BIOS. Then Make sure that CD is set to boot first.

FAN_Bios

 

6.)  Now Open your Virtual Server, and START it up. You should be greeted by the Nagios-FAN Welcome Screen. Hit the “ENTER” key to begin installation.

**Note: Your mouse WILL NOT work during the install process.

CentOS_LinuxRescue_Boot

 

7.) Select your Language. Then Keyboard Type.

FAN_Setup1

 

8.) If you are working with a Clean Slate on your virtual machine, You can simply Hit Next at this screen to accept the default values. Alternatively if you are overwriting  the contents of an existing Hard drive – I would change this to “Overwrite contents of Hard drive and create default Layout.”

FAN_Setup2

 

9.) Select a Map Region.

FAN_Setup3_Map

 

10.) Set your root password.

FAN_Setup4

 

11.) You will then be prompted to Reboot. But Before you Reboot, Go back to your Hyper-V Manager Window, Highlight your Fan Server and click Settings. You will then want to UN-mount your .ISO image from your DVD drive. Then Go Back to your Fan Server Console and Reboot.

FAN_Setup5

 

12.) Nagios-FAN will then start to reboot, if you have done everything right so far – you should see the below prompt. Select ” Network Configuration” and then hit Enter.

FAN_Network_install

 

13.) You will then Be prompted to “Edit Devices”  -or-  “Edit DNS Configuration“. Select Edit Devices First. Select your NIC card, Then Enter the Following information….

  • Static IP Address
  • Subnet Mask
  • Default Gateway

FAN_Setup6

 

14.) After you Set your Network information, You will want to select ” Edit DNS Configuration “. Change the Name of your server to anything that you would like.

FAN_DNS_Config

 

15.) Once you have configured your Network and DNS settings. You should be greeted by the FAN Main Page. You can login Using…

  • Login: root
  • Password: ( remember when you set the root password? )

Fan_HomePage

 

16.) Type ” ifconfig “, You will see the NIC information for eth0. You will probably notice that the IP Address you set hasn’t been updated yet…

17.) Next-  type “ifup eth0” to restart your Network Interface! This will update your IP address. If it does not – Run a Reboot command.

18.) Now Test your Network Settings to make sure you can reach the internet.

19.) Once your Fan Server is on the network, You can access it by browsing to http://@Fan_Server_IP_address.

*You may want to Setup (A)Host forward look-up Zone on your DNS Server at this point…

 

 

Additional Information:

  • You Can Use Putty to Access your Fan Server Command Line Interface Remotely.
  • To make changes to your network / DNS Settings use the command # system-config-network
  • Basic Text Editing Commands using vim…
    • vim “targetfile.cfg” = edit your selected file
    • i = insert / edit mode
    • esc = exit edit mode & enter command mode
    • :q = Exit vim
    • :wq = Write and Exit
    • cat “targetfile.cfg” = will display the contents of the text file you target.
  • You can find detailed information about using vim HERE.
  • DO NOT RUN YUM UPDATE. ( If you are using version 2.2 for use with HyperV )

 Configuring Nagios-FAN

 

 

Step 1 – Install SNMP

 

1.)  Control Panel > Add/Remove Programs > Add/Remove Windows Components > Check Management and Monitoring Tools. Then click Details…

SNMP_Install_1

 

2.) Select Simple Network Management Protocol, Then click Next > to install. ( you may need a CD )

3.) Now go to your Services, Find both SNMP services and make sure they are started and set to automatic.

4.) Now open the SNMP Service properties, and go to the Agent tab. Then make sure the following are selected…

SNMP_Install_5

 

5.) Next – Go to the Traps tab. Create a Entry for your FAN server using your FAN IP address. Using “public” as your community name.

SNMP_Install_3_5

 

6.) Now go to the Security tab. And Setup as shown… ( using your own IP address of course )

SNMP_Install_4_5

7.) Lastly, Restart your SNMP Services.

 

Additional Info:

  • If you are having problems connecting via SNMP, Do a ifconfig to make sure that your FAN server has the proper I.P address. If it does not – Run Reboot and restart your FAN server and try again. If it is STILL not working – You can always set SNMP to “Accept SNMP packets from any host”in the Security Tab as shown above.
  • If you do not use ” public ” for the community name on the Traps & Security settings for SNMP – It will not work! (unless you want to do some extra work)

 

Step 2 – Configure & Monitor Hosts in Centreon

 

1.)  Navigate to your FAN Landing Page @  http://@FAN_Server_IP_Address

2.)  Once There, select Centreon from the left hand menu.

Centreon_HostSetup1

 

3.)  From the homepage, you want to browse to Configuration > Hosts. Then click on add to create a new host.

Centreon_HostSetup2

 

4.)  Configure all the necessary Host Details. I have included a screenshot of how I have my Windows Server configured with SNMP for reference. For Linux Servers you can use the Default Centreon Entry as a template.

Centreon_HostSetup_3

 

 

5.)  When you are content with your Host settings click Save, and Then go to Configure > hosts  &  Configure > Services and Make sure that your newly added Host shows up.

6.) Now go to Configuration > Nagios, Select all the check-boxes and set the restart method as ” Restart “. Then select Export.

Centreon_HostSetup4

 

7.)  When the Export Process is Complete, A status bar will appear below showing you if the process completed successfully or not. You want to see the following:

Centreon_HostSetup5

 

8.)  Now you should be able to Browse to Monitoring > Hosts and see the status of your new Host!
(It will also be available in the Nagios Interface)

Centreon_HostSetup6

 

Service Configuration Screenshots

I’ve configured the following 5 main Service / host monitors in different ways, just to show you what a functional configuration might look like. The first 2 are nearly empty – but they function because they inherit all the needed information via the Service Template. I will be posting a screenshot for each service / device i monitor and list it here. SNMP covers all the basics really well 🙂

 

CPU Config

SNM_WinCPU_Example1

Memory Config

SNMP_WinCPU_Example_Memory

C: Drive

SNMP_WinCPU_Example_Disk

 

Service Monitoring:

***A Big Thank you to George1421 on the Spiceworks.com Forums for helping me figure this out.

 

1.) First you Have to Create a Command under Configuration > Command.

check_snmp_win_Service_command_1

 

2.) Next go to Configure > Services. Then Configure your Service as follows…

check_snmp_win_Service_command_2

 

3.) Then Just Run the ConfigExport Function to Add it to your production environment for monitoring!

 

Individual Processes

There is an important Distinction to recognize on Processes VS Services.  While you can sometimes craft process monitors to in effect monitor your desired service – For the most part, you will want to Use the SNMP process described above to monitor public Services & NSClient++ if you need to monitor private Services. (For most instances – You will probably want to use the service monitor!)

 

I finally figured out why the default Check_centreon_process command wasn’t working for me!! – Muhahahaha..*ahem*. Right, where was I?

So the way I figured it out was by testing the given commands for the template I was using via the command line interface…. I tested the pre-populated one and what do you know… it didn’t work!!

For Example:

To fix this, go to Configuration > Commands & select Check_Centreon_Process. Then remove the -n entry as shown…

SNMP_Service_Example2

 

Then you can configure your Process check…

SNMP_Service_Example5

 

 

Step 3a – Email Notifications

 

Before We Setup Postfix

Before we dive in and start setting up Notifications in Centreon, We need to login to the command-line interface and configure & test Postfix. First thing first however, we want to confirm that our Network & DNS settings are functioning properly and we can reach our Mail Server.

  1. Ping Google.com. If it fails – Run #system-config-network to make sure you have DNS properly configured.
  2. Ping your smtp.example.com site, If your DNS settings are correct, You should be able to Ping it.
  3. Next we must configure Postfix as described on the Centreon Site and summarized below.

 

Setting up Postfix

To configure our Postfix server for relaying emails through smtp.example.com, we run :

Our username (root) and password (nagiosadmin) for smtp.example.com must be stored in /etc/postfix/sasl_passwd, therefore we do this:

/etc/postfix/sasl_passwd must be owned by root, and none else should have read access to that file, so we do this:

Now we must convert /etc/postfix/sasl_passwd into a format that Postfix can read:

This will create the file /etc/postfix/sasl_passwd.db.
Change name from :

Now we must convert /etc/postfix/canonical into a format that Postfix can read:

Check that your Postfix main.cf config file has the correct relay host set ( scroll all the way to bottom of the file)

All that is left to do is restart Postfix:

You should be able to run the following command to test postfix:

If you have had notifications enabled while you were trying to configure notifications – you may have a huge amount of notification e-mails queued like i did. You can view how many are queued by typing

To delete all items in queue:

 

Additional Information:

  • If you are not having success using the FQDN of your smtp server, Try simply using the IP Address.
  • If you are having problems with getting E-mail notifications to work – Go through the Postfix Process again and double check to make sure you replaced SMTP.example.com entries with your own information!

Setting up E-mail Notifications


Before you can do anything, Centreon needs to know who it is sending Notifications to, Each user must be configured with the proper contact information. In the example given below, you can see that my user account is ONLY configured to receive e-mail notifications.

Notification_UserSetup_Example

 

 .

Step 3b – SMS Notifications

Method A

 

Configuring an SMS Notification in Centreon

Each major cell phone carrier is able to translate an e-mail to an SMS message when given the proper format from a trusted source. Now all we need to do is create an external user in Active Directory for each person that needs to be notified via SMS, using the following E-mail formats.

  • Verizon:             1112223333@vtext.com
  • AT&T:                  1112223333@txt.att.net
  • US Cellular:       1112223333@email.uscc.net
  • Sprint:                 1112223333@messaging.sprintpcs.com

External_Email_User

You then add each team member to a Distribution group – and Setup Alerts to be sent to that distribution group, just as you would send out an e-mail Alert.

 

Method B

Notice:
While Method B is functional, and tested working – Method A is much easier to setup / configure and maintain. I encourage anyone reading this guide to use Method A, unless you are comfortable working with Exchange Relay connections and understand fully what you are doing.

 

Setting up SMS Notifications

Setting up SMS Notifications is slightly more involved then setting up E-mail notifications, And there are a number of different ways to accomplish this feature – But most of them require additional hardware. I wasn’t too keen on adding another piece of hardware just to send SMS notifications, So I dug around a bit and found a really great alternative that can be accomplished in 4 main steps.

  1. Install and Configure Sendmail.
  2. Configure Exchange as a Relay Server for Nagios
  3. Testing your Setup
  4. Configure the Notification command in Centreon.

 

Install & Configure Sendmail

***A special Thanks to MensaWater from the Linuxquestions.org Forums for providing detailed instructions on how to Configure Sendmail.

 

SSH into your Nagios Server command line. And run the following commands.

 

Basically you just tell your Mail Transport Agent (MTA) to “relay” to the Exchange server. Usually the Exchange administrator has to configure Exchange to allow such relaying. (It is not allowed by default to prevent spam.)

How to setup “relay” in the MTA depends on which one you’re using. I use Sendmail since that’s the one that comes with most UNIX/Linux OSes by default. Many prefer Postfix but if you’re not receiving mail there seems little reason to use Postfix.

Some notes on Sendmail setup for relaying (first you have to let it relay to itself because by default it denies relay from local host [ip 127.0.0.1] to the public IP of the host.

 

Stop sendmail if it is running

 

Now we want to open up Sendmail.mc to make a few changes.

 

Find the following section of code in your sendmail.mc file and remove the “dnl” from the beginning.
(dnl= do not load).

 

Next you are going to replace the example `smtp.your.provider text with the web address of your SMTP server as shown below.

 

Scroll down until you find the following line:

 

Then you are going to want to add a similiar line below it, replacing “127.0.0.1” with your Nagios Server IP Address as shown below.

Sendmail_Config_Example2

Since we are already in this directory, MensaWater suggests that we go ahead and edit our Access file.

 

You’d want to add your FQDN and short name to the file.

When you are done editing the access and sendmail.mc file. We need to run #make -C /etc/mail to compile them.

 

You’d then want to restart sendmail.

 

 

Configure Exchange Server as a Relay: 

** Thanks to Paul CunningHam from Exchangeserverpro.com for providing detailed instructions on how to perform this task.

 

1.) Login to your Exchange Management Console.
(Make sure that you are using an account with Full administrative credentials.)

2.) Navigate to Server Configuration > Hub Transport > New Receive Connector….

Nagios_ExchangeRelay_1

 

3.) Name the Connector and click “Next” to continue.

Nagios_ExchangeRelay_2

4.) By default the New Receive Connector wizard will Allow all IP addresses available by default. However, I personally recommend that You enter your Exchange IP address only for security purposes.

Nagios_ExchangeRelay_3

5.) Next you will be prompted to input the acceptable IP Range for Exchange to accept requests. Again for security reasons, You should make this value as absolute as possible.

Nagios_ExchangeRelay_4

6.) Once you have configured your network Settings, Click the “New” button to complete the wizard.

7.) Now find your newly configured Exchange Relay, Highlight it and select Properties.

Nagios_ExchangeRelay_5

8.) First – Select the Permissions Groups tab and check Exchange Servers.

Nagios_ExchangeRelay_6

9.) Then go to the Authentication Tab and select the following:

Nagios_ExchangeRelay_7

10.) Now just hit Apply to update the settings and you are done!

 

 

Testing your SMS Notifications

***The following instructions were taken from www.yuk-onna.co.uk/email/smtp.html (link no longer seems to work)

 

QUOTE:

 

Configuring an SMS Notification in Centreon

Each major cell phone carrier is able to translate an e-mail to an SMS message when given the proper format from a trusted source. The entire reason we went through routing our Nagios Server Sendmail function through our Exchange server is because Verizon will immediately reject our sendmail Notification otherwise. Now all we need to do is create a User for each person that needs to be notified via SMS, using the following E-mail formats.

  • Verizon:             1112223333@vtext.com
  • AT&T:                  1112223333@txt.att.net
  • US Cellular:       1112223333@email.uscc.net
  • Sprint:                 1112223333@messaging.sprintpcs.com

Now once your User is created, you will need to craft a new command to send SMS notifications. We can use the Notify_by_email Alert as a template.

SMS_Config_Example1

 

Method C

I have yet to personally go through setting up SMS Notifications to be routed through SMSTools via a GSM modem ( or Cell phone ). However one of my readers “BoB” – Was kind enough to share his Tutorial! It is rather lengthy, So in the interest of trying to keep this already monstrous post more manageable – I’ve decided to Create a sepearte post for the process!

Notify Via SMSTools

 

Step 3c – Jabber Notifications

 

There are a number of different IM clients that you can configure Nagios to send out alerts to. For the sake of simplicity, I am going to be covering a very common configuration of having Nagios push out alerts to Google Talk. If you would like to share your configuration for other clients – I encourage you to post and share in the comments below!

 

Pre-requisites & Testing

 

1.) Run the following command to install all of the following components

perl-Net-Jabber_Details

2.)  Browse to /usr/lib/nagios/plugins/

3.)  Create Notify_via_GoogleTalk file using the following code from Andrew Elwell.

 

4.) Then set the proper security on the file.

 

5.) Login to your Gmail account and Google Talk.

Notify_via_GoogleTalk_Nagios

6.)  Finally, test your Notification.

 

If everything works out – You should be able to see the test message you just sent via your G-mail interface.

 

Configuring Alerts in Centreon

 

1.) You can either create a new command or modify the existing “notify_via_jabber” command as follows.

Notify_via_jabber_Centreon_Command_Example

2.) Next you will need to add each users “Jabber” name in the user Contact Pager field.

For Example:
Admin@gmail.com = Admin
Mr.test@gmail.com = Mr.test

Notify_via_jabber_Centreon_UserPager_Example

 

Troubleshooting Tips:

  • If you are receiving Cannot Resolve FanServer error message when running your Notify_via_jabber command, then you Must run #system-config-network and make sure that your DNS name matches your DNS Server! If you are still receiving this error message, add your servers hostname to 127.0.0.1 in /etc/hosts.

 

Additional Resources:

Fun with Nagvis

 

I just started seriously messing around with Nagvis today and am really impressed with the plugin. If Nagios and Centreon are the bread and butter of FAN, than Nagvis is the polish! I initially started out thinking that I would be able to photograph all of our server racks and Photoshop them all together into one seamless background to import into Nagvis, what I quickly found out was that:

1.) There is no room in our Server room to take a qaulity picture at a decent angle
2.) Updating our Server rack configuration in this fashion would be much more time consuming and rigid than using Visio
3.) Visio is awesome.

So I started documenting our Server Rack configuration and translated it into Microsoft Visio, using the extensive library of Visio stencils @ VisioCafe.com. This is what I came up with…

Nagvis_Example_2

 

Now this is still a work in progress, but damn if it didn’t feel good to see all of my hard work come together in the Nagvis interface!

 

Nagvis Tips & Tricks

.
Extras

Installing NSClient++

 

For the more advanced monitoring features, you are going to need to install NSClient++. To speed up this process, You can create a unattended batch file using the link below – or you can wait patiently for me to document the process :D.

 1.) Download the .MSI Install Package @ http://www.nsclient.org/nscp/downloads

2.)  Run the Install package until you get to the following screen. For the purposes of this guide, we are going to simply Choose Typical.

NSClient_Install

 

3.) Next

NSClient_Install_config

 

4.) Continue to Configure your Client Settings.

NSClient_Install_config2

 

5.) After you have configured your Host IP & modules, You can then start the installation. It should take about 30 seconds to finish.

6.) You can Find The Program installed under Start > All programs.

NSClient_Install_config3

7.) The Latest version of NSClient++ should automatically add an exception to Windows Firewall, But if you are using an older version of NSClient++ or are using a different firewall program – You will want to add it as an exception manually.

8.) You can Configure your NSClient++ install to a ridiculous degree…. But for now, we are just going to worry about monitoring the basics. If you are feeling ambitious you can review all the different Configurations available Here.

 

Additional Information:

System tray:

The system tray has been temporarily removed in the 0.4.0 version it will be added back in a future version much improved. Since the system tray is not really an essential feature this is deemed low priority but the idea is to replace it with a configuration interface and proper client.

 

Install GNOME Graphical Interface

When Prompted > Select Yes to continue.

If everything installed correctly You should get a Nice Install Complete message.

  • Startx ”  To Enter GUI Mode.
  • Ctrl + Alt + Backspace ” To Revert to Command Line

**I am still working on getting the Mouse to Work when Remoted into the Hyper-V server on my FAN Server. For now, I would advise using the Command Line interface if needed. ( unless you figured out how to enable Mouse control – Then please share in the comments!!! )

 

Troubleshooting Section:

I’m going to document some of the hangups I ran into when setting up Nagios-Fan here, if you encounter an issue that isn’t addressed in this guide – Please feel free to ask in the comments and I’ll do my best to help.

  • The Resources listed below are the most useful links I came across during my setup process – They just might be able to help you as well!
  • If you Duplicate a Host schedule / service check – Make sure to change the IP address!
  • It is always a good idea to test your commands via the command line interface if they are not working as you think they should…
  • For Example:

 

 

Resources:

 

  • Bob

    I am trying to use ” CLICKATELL ” with FAN and found this link:
    http://itnut.blogspot.com/2009/07/nagios-alerting-by-sms-using-clickatell.html

    My problem is I do not Know where to place the Files for ” send_sms, command.cfg, templates.cfg and contacts.cfg.

    Is there any way you can help me out with this

    Thank you very much for a GREAT Tutorial. It helped me a LOT

  • Bob

    Rionoskae thanks for your help.

    Ok I have found all the files and did the following as per the link: http://itnut.blogspot.com/2009/07/nagios-alerting-by-sms-using-clickatell.html

    1. Created a file ” send_sms ” in FAN > /usr/libexec and added the content to it including my CLICKATELL Login Details as per the web link.
    2. Edit the file /usr/share/doc/nagios-plugins-1.4.16/command.cfg and placed the content into it as per the web link.
    3. Edit the file /etc/nagios/objects/templates.cfg and placed the content into it as per the web link.
    4. Edit both the File(s) /etc/nagios/objects/contacts.cfg and /usr/share/centreon/filesGeneration/nagiosCFG/1/contacts.cfg and placed the content into it as per the web link.
    5. The web link article says ” Use the SMS_ABCDE in the contact_groups when you define the service/host ”

    I went to Centreon ” Configuration > Services > and Chose a Service.
    In the menu of the Service, at the bottom ” Notification ” there is NO Option to ” Use the SMS_ABCDE in the contact_groups ” as per the web link explanetion.

    Please can you be so kind as to assist in what i need to do to get the SMS Notification to work in FAN Using Centreon

    • Rionoskae

      Bob,

      Unfortunately I’m not familiar with CLICKATELL at all…. I have however outlined 2 different methods in my guide to send SMS alerts. I assume you are using CLICKATELL for alerts to make sure alerts still go out even if the exchange server or network goes down?

      It looks like you are following someone-body elses Blog Post to set this up – Have you had any luck getting a response from the author?

      I found another Guide on the topic that is a bit more detailed…Hopefully this works for you:
      http://www.stochasticgeometry.ie/2010/03/18/nagios-sms-notifications-clickatell/

      If you do figure it out, It would be great to have a proper guide written on the subject somewhere on the Net and I’m sure others would be grateful. If you were interested in submitting your setup process – I could set it up as a guest post here on my Blog. I wish I could be more help…But I think your best resource right now is trying to contact the original author for clarification.

  • Bob

    Rionoskae thanks for your help

    I have a USB Modem and want to use that on my FAN System to send an sms to a group
    I have looked at the Centewon Link: http://en.doc.centreon.com/HowToSendSMSWithGammu
    I have installed comgt.0.32.tgz and can see my USB Modem
    My problem is installing the gsm-utils and gammu application on FAN
    When I do a ” yum install gsm-utils gammu

    No package gsm-utils available.
    No package gammu available.

    Where can i get the FAN Installation files for gsm-utils and gammu and how do i install gsm-utils and gammu??

    Sorry about asking you again. I really need to install this

    • Rionoskae

      Hmm… I’m not entirely sure Bob. Neither package is showing up for me in the epel repo.

      The documentation you linked described a debian install of both tools…and perhaps it is a debian only tool…

      Is CLICKATELL a paid service? It looks like it from their website…They don’t have documentation on setting this up in Centos? Or just not for Nagios?

      If it were me. I would try to setup the ability to use the apt-get feature using:
      http://dag.wieers.com/blog/using-apt-in-an-rpm-world

      And then use apt-get install process described in…
      http://en.doc.centreon.com/HowToSendSMSWithGammu

      I’m no linux expert, but it sounds like a solid plan in theory… ( doesn’t it always? )

      Best of Luck Bob

  • Bob

    Rionoskae what can I say but THANK YOU

    All SMS Alerts are WORKING in FAN

    I would like to send you my Document Explaining what I did to get SMSTOOLS and Centreon to work using an USB Modem.

    Thank you so much for your help.

    It is very kind of you assisting me.

    • Rionoskae

      Nice!!

      I’m super glad to hear that you were able to get it working Bob. I would love to share your documentation on the process in this guide if that is alright – Please send me an e-mail @ Ryanjamessiegel@gmail.com and we can hopefully save the next guy a good bit of headache 🙂

      ~Cheers

  • Bob

    Good day Rionoskae File has been sent

    I have a question regarding Centreon Reporting in FAN

    When i login to Centreon and go to ” Reporting > Dashboard > Hosts > I Choose a HOST ” There is NO information displayed about the Host or Services.

    I really need reporting to work. Any ideas what i can do.

    • Rionoskae

      Got the Document, Thanks Bob – You really did a great job detailing the entire process, very much appreciated 🙂

      As far as reporting goes… I will take a look when I get in the office and report back.

      ~Cheers

  • Rionoskae

    I logged into the FAN Demo page…and I think you just have to specify a host.

    On the top left hand side of the page there should be a drop down to select a host, once selected reporting should populate…

  • Bob

    Rionoskae thanks for your help

    I have done this and have checked, however i get no data displayed when i go to:
    Reporting > Dshboard > Services ” Choose Host Name and Choose a Service ” then I choose ” Reporting Period = This Month or any Date. All I get is the Following = Undetermined 4w 2d

    I also have a Problem with Logs:
    Monitoring > Event Logs
    Main Menu : All Logs ” Host Groups = All Ticket ”
    I Choose Last 30Days ” Message Tpe = All Ticket ”
    I Choose Apply = NO RESULTS

    I have looked on the web however I am not sure what to look for. I am using the Latest FAN Distro.

    Any ideas??

  • Hello Author, I wanted to point a few “mistakes” you have in your walk through here. Now mind you i’m no expert, I used this guide to build my first FAN server, so kudos and thanks! I just figured i’d point them out so that others using this walk through, if they experience the same issues, can resolve them.

    1. Setting up Service Monitoring; I noted 1 very very tiny mistake in this walk through. When you put in your ARGS value, you should note to the reader that you don’t want to use the “service name” you want to use the “display name” of the service. Additionally if there is a space in the display name like you have listed BP Agent, Nagios doesn’t like spaces, you need to have “” in. So it would be “BP Agent”. I spent about an hour trying to figure out first why nagios was telling me a service did not exist, then telling me i couldn’t find “Windows” when I had Windows Firewall in. Simple things, but things that really stump “newbie’s” sometimes.

    — I’m not sure if I missed something but your monitoring of the “C: Drive” setup, reports back system memory for me, i’ve yet to resolve this one.

    –Postfix, now this might be because i’m using a hosted exchange server that filters by mac address who can relay off of it, but i’ve yet to get this working either. But that one might be me.

    Regards

    • Rionoskae

      Dr. GeekIT,

      Thanks for taking the time to post all of that feedback! Regarding your comments:

      1.) It may be hard to see in the pic – but this is due to how you crafted your command for check_snmp_win. I actually put qoutes in the command to avoid that very issue. I’m glad you pointed it out though, as those qoutes are hard to make out in the screenshot.

      2.) Just verified my settings for the C: drive alert…everything checked out ok for me…reading used space & free space. I would verify snmp is setup on the target server and is set to public. Also verify the “Check command” is set to –
      check_centreon_remote_storage.

      3.) The postfix process was actually borrowed from the centreon site itself, There are a number of sections in the code that require to substitute your personal info – I would double check that first and go through the process again.

      ~Good Luck Dr.

  • Please, after the installation fo FAN nagios, it refuse my login.

    • I’m going to need more details regarding your failure…

      *What version are you installing?
      *HyperV or Physical
      *What error are you getting exactly? you can upload a screenshot to the Forums section Here:
      http://everyday-tech.com/Forum/index.php?board=10.0

      Are you using The Default login/password : nagiosadmin/nagiosadmin

  • Kazum Najafi

    HI I was wondering if anyone can help? I am setting the email notification so this works with my exchange server, Do I need to create a new email account for nagios on exchange as when I followed the instructions and used my FQDN and user credentials it comes with an error message that it faield to aithenticate with the server. What format should the username be for a domain user? Also i am assuming that I need to change the smtp.example.com with my own FQDN?

  • Pingback: EDT Recommends – My Top 10 Essential WordPress Plugins | EveryDay-Tech.Com()

  • Pingback: Nagios FAN setup | Round and Bilog()

  • Pingback: AdagiosPi - Server Monitoring On The Pi Just Got A Little More Awesome... | EveryDay-Tech.Com()

  • Sukhpal

    Hello,
    when I create an account in centreon it works when I log into centreon but not the nagios link, the only account that works in nagios is the nagiosadmin account, can you tell me how to create accounts that can be used to log into the nagios link?

  • Andy6061

    Just come across FAN and have followed the intallation. logging into Centreon is OK as is adding a host, but there is no “Nagios” on the configuration bar so i cant export. Anyone help?
    Thanks

Pin It on Pinterest