How to install Nagios, Centreon, Nagvis, CheckMK Ubuntu 1.Server Ich arbeite schon seit mehreren Jahren mit Nagios vorallem aber mit der Oberflche Centreon.Wer Nagios noch per Shell bedient und somit hunderte Config Files pflegt msste Centreon eigentlich lieben.Eine Oberflche von der aus alles gesteuert wird.Komfortables anlegen von Hosts, Diensten und allen notwendigen Gruppen.Mit mehreren Klicks keine Config Files mehr diese werden dann durch Centreon automatisch erstellt.Zur grafischen Anzeige benutze ich Nagvis was noch die Erweiterung checkmk bentigt.Damit lassen sich dann nette Weathermaps erstellen oder den Serverraum in einem Bild mit dem dazugehrigen HostService Status darstellen.Als Betriebssystem nutze ich ausschlielich nur Ubuntu daher ist das Komplettpaket FAN Fully automated Nagios Cent.OS fr micht nicht interessant.Hier ein Howto zur Installation von Nagios, Centreon, CheckMK und Nagvis.In naher Zukunft werde ich auch mal ein.OVF Template erstellen.Vorraussetzungen Ubuntu 1.Server installiert.Bevor wir anfangen noch obligatorisch die Updates machen apt get update.Notwendige Abhngigkeiten installieren apt get install gcc make g lsb release tofrodos apache.GGf. Vmware Tools installieren VMware Tools mounten mkdir mntcdrom.How To Install Nagvis On Centos Install' title='How To Install Nagvis On Centos Install' />Nagios selfpaced training material is organized by product and topic.Nagios XI Nagios Core Materials Nagios XI video tutorials are grouped by category.Weekly Edition Daily updates Events Calendar Book reviews Penguin Gallery.About LWN. net The LWN.Linux Distribution List You have found the LWN.Linux. Gert devsr.Nur Lese Modus. VMware.Tools 8. C tmp. rootcentreon cd tmpvmware tools distrib.Ich habe die VM Tools mit Standardeinstellungen installiert.Anschlieend Reboot shutdown r now.GGf. Proxy im Wget eintragen vi etcwgetrc.Fully Automated Nagios.The purpose of FAN is to provide a quick and easy installation which includes the mostused tools in the Nagios community.Installation von Nagios Hier gibt es zwei Mglichkeiten.Entweder von Hand installieren, oder die fertigen Packete nutzen.Ich empfehle es von Hand zu installieren, da die Pakete oftmals nicht aktuell sind.Also finger weg von apt get install nagios.Nagios benutzer anlegen usrsbinuseradd m s binbash nagios.Gruppe anlegen usrsbingroupadd nagios.Gruppe hinzufgen usrsbingroupadd nagcmd.G nagcmd nagios. usrsbinusermod G nagcmd www data.Nagios herunterladen wget http downloads.A2. F2. Fwww. nagios.Fdownload2. Fcore2.Fthanks2. F ts1. F2.Fwww. nagios. Fdownload2.Fcore2. Fthanks2.F nagios 3. Nagios Configurieren.Creating sample config files in sample config.Configuration Log Configuration summary for nagios 3.General Options Nagios executable nagios.Nagios usergroup nagios,nagios.Command usergroup nagios,nagcmd.Embedded Perl no.Event Broker yes.Install prefix usrlocalnagios.Lock file prefixvarnagios.Check result directory prefixvarspoolcheckresults.Init directory etcinit.Apache conf. d directory etcapache.Mail program binmail.Host OS linux gnu.Web Interface Options HTML URL http localhostnagiosCGI URL http localhostnagioscgi binTraceroute used by WAP Review the options above for accuracy.If they look okay,type make all to compile the main program and CGIs.Compile finished Nagios installieren make all.Nagiosadmin fr Webinterface anlegen htpasswd c usrlocalnagiosetchtpasswd.Re type new password.Adding password for user nagiosadmin.Autostart hinzufgen ln s etcinit.S. dS9. 9nagios. Nagios Plugins installieren wget http downloads.A2. F2. Fwww. nagios.Fdownload2. Fplugins2.F ts1. 34. 07. F2.Fwww. nagios. Fdownload2.Fplugins2. F nagios plugins 1.Nagios starten etcinit.Mal die Webseite aufrufen http servernagios.Benutzer nagiosadmin.Prfen ob Statusmap funktioniert.Bei dem Fehler The requested URL nagioscgi binstatusmap.Nochmal ausfhren apt get install libgd.Nagios neustartenetcinit.A2. F2. Fsourceforge.Fprojects2. Fnagios2.Ffiles2. Fndoutils 1.Fndoutils 1. 5. 22.F ts1. 34. 07. Setuplog.Hint NDOUtils Installation against Nagios v.If you want to install NDOUtils for Nagios v.Next step should be the database initializationupgradecd into the db directory and either.Verlasse Verzeichnis tmpndoutils 1.Main NDOUtils components installed.So nun kann Centeron installiert werden.Beachtet das hier ggf.Internetverbindung bentigt wird, da durch das Setup einige PEAR Komponenten aktualisiert werden.Centreon installieren wget http download.Centreon Setup. Do you accept GPL license Please choose what you want to install. Cyberlink Powerdvd Mark Ii Ultra 3D V10 Icon . Do you want to install Centreon Web Frontyn, default to n y.Do you want to install Centreon Cent.Coreyn, default to n y.Do you want to install Centreon Nagios Pluginsyn, default to n y.Do you want to install Centreon Snmp Traps processyn, default to n yStart Cent.Web InstallationWhere is your Centreon directory Do you want me to create this directory Path usrlocalcentreon OKWhere is your Centreon log directorydefault to usrlocalcentreonlog Do you want me to create this directory Path usrlocalcentreonlog OKWhere is your Centreon etc directorydefault to etccentreon Do you want me to create this directory Path etccentreon OKWhere is your Centreon generationfiles directory Path usrlocalcentreon OKWhere is your Centreon variable library directory Do you want me to create this directory Path varlibcentreon OKWhere is your Cent.Plugins Traps binarydefault to usrlocalcentreonbin Do you want me to create this directory Path usrlocalcentreonbin OKWhere is the RRD perl module installed RRDs.RRDs. pm Path usrlibperl.OKusrbinrrdtool OKWhere is mail binarydefault to usrbinmail usrbinmailxusrbinmailx OKWhere is PEAR PEAR.PEAR. php Path usrsharephp OKWhere is installed Nagios Path usrlocalnagios OKWhere is your nagios config directorydefault to usrlocalnagiosetc Path usrlocalnagiosetc OKWhere is your Nagios var directory Path usrlocalnagiosvar OKWhere is your Nagios plugins libexec directory Path usrlocalnagioslibexec OKWhere is your nagios binary OKWhere is your Nagios image directory Path usrlocalnagiosshareimageslogos OKWhere is your nagiostats binary OKp.OKusrbinphp OKusrbinperl OKFinding Apache group www data.Finding Apache user www data.Finding Nagios user nagios.Finding Nagios group nagios.Where is your NDO ndomod binary OKConfigure SudoWhere is sudo configuration filedefault to etcsudoers etcsudoers OKNagios init script OKYour sudo is not configured.Do you want me to configure your sudo WARNINGyn, default to n y.Configuring Sudo OKConfigure Apache serverDo you want to add Centreon Apache sub configuration file yn, default to n y.Create etcapache.OKConfiguring Apache OKDo you want to reload your Apache yn, default to n y.Reloading Apache service OKPreparing Centreon temporary files.Change right on usrlocalcentreonlog OKChange right on etccentreon OKChange right on usrlocalnagiosshareimageslogos OKInstall nagios documentation OKChange macros for insert.Base. Conf. sql OKChange macros for php files OKChange right on usrlocalnagiosetc OKCopy Cent.Web in system directory.Install Cent. Web web front of centreon OKInstall libraries OKCopying libinstall OKChange macros for centreon.OKInstall Centreon cron.OKChange macros for cent.Acl. php OKChange macros for downtime.Manager. php OKChange macros for event.Report. Builder. pl OKChange macros for dashboard.Builder. pl OKInstall cron directory OKChange right for event.Report. Builder. pl OKChange right for dashboard.Builder. pl OKPear ModulesCheck PEAR modules.PEAR 1. 4. 9 1. 9.OKDB 1. 7. 6 NOKDBData.Object 1. 8. 4 NOKDBData.ObjectForm. Builder 1.RC4 NOKMDB2 2. 0.NOKDate 1. 4. 6 NOKHTMLCommon 1.NOKHTMLQuick. Form 3.NOKHTMLQuick. Formadvmultiselect 1.NOKHTMLTable 1. 6.NOKArchiveTar 1. OKAuthSASL 1.NOKConsoleGetopt 1.OKNetSMTP 1. 2. 8 NOKNetSocket 1.NOKNetTraceroute 0.NOKNetPing 2. 4. NOKValidate 0.NOKXMLRPC 1. 4. 5 NOKSOAP 0.NOKLog 1. 9. 1. 1 NOKDo you want me to installupgrade your PEAR modulesyn, default to y y.Nagios. Pi Server Monitoring With The Power of Pi.Nagios. Pi is a lightweight, feature rich fully configured Server Monitoring Distro for the Raspberry Pi.The Image contains Nagios Core, The Nconf front end to easily edit hosts and configurations, Nagvis to translate your network health into an easy to read visual heads up display finally Rasp.Control to keep a close eye on Raspberry Pi Stats While I have yet to test out the performance of Nagios.Pi in larger environments Im really optimistic about the general performance of the Image, as website response times are every bit as fast as the Last Nagios Image Ive done.In fact, since we are using Nconf and Make livestatus to interact with Nagios Response times have been fantastic.If you wish to contribute ideas or time to the image, Please leave me a comment below or feel free to E mail me directly via my Contact page.Enjoy. Download Nagios.Pi You can download v.Nagios. Pi HERE.Installing Nagios.Pi Download Win. Disk.Imager. Write image to SD Card.After initial Boot up, Run Sudo raspi config to expand the file system.About The Image SSH piraspberry.Overclocked to Medium Setting.Nagios. Pi Landing Page http RaspIpaddres.This slideshow requires Java.Script. For anyone interested in the details of my build, Ive documented my entire process step by step.Getting Ready. Burn the latest image of Raspbian Wheezy to your SD card.Expand your File system and customize.Set Host. Name Nagios.Pi in this image.Set Over. Clock Meduim in this image.Reboot sudo raspi configexpand filesystemSet Host.Name Nagios. Pi in this imageSet Over.Clock Meduim in this imageReboot Lets get up to date.Installing PHPmyadmin.Install the My. SQL DB.Install phpmyadmin.Choose apache when prompted.When you are prompted again to configure DB via dbconfig select yes.Next we need to alter the Apache configuration to include PHPmyadmin.Scroll to very bottom of the file and add the following line Include etcphpmyadminapache.Save the file. Ctrl X Then Y to confirm 5.Now just restart the pache service.Now you should be able to access your My.SQL database by accessing http Nagios.Piphpmyadmin. User root.Pass nagiosadmin.Installing Nagios.Install Nagios. 3.Install NRPE plugin optional.Installing Nconf.Download Extract Nconf v.C varwwwcdtmpsudo wget http downloads.Cvarwww. While were at it, Lets give apache permission to the varwwwnconf directory.R www data www data varwwwnconf.Rwww data www datavarwwwnconf.Before we begin installing Nconf, Well need to go login to PHPmyadmin and create the required Nconf database and user Browse to http Nagios.Piphpmyadmin. User root.Pass nagiosadmin.Privileges Add a new user.User name nconf.Host localhost.Password nagiosadmin.Check the radio button to Create database with same nameFinally, Set the User permissions as shown in the screenshot below.Click Go to finish.Then Browse to http Nagios.Pinconf. 3. Most of this install is going to be just clicking the next button.However you will need to make one important change on Step 2 of the install process.This change has been highlighted in the screenshot below.After Nconf installs, You will be prompted to delete the Update Install files.INSTALL. sudo rm varwwwnconfINSTALL.UPDATE. sudo rm varwwwnconfUPDATE.INSTALLsudo rmvarwwwnconfINSTALL.UPDATEsudo rmvarwwwnconfUPDATE.Now we need to tell Nagios to use Nconf config files.We will want to comment out any lines that begin with cfgdir or cfgfile.Then add the 2 following lines.Defaultcollectorcfgdiretcnagios.Defaultcollector.Exit Save. 6. Create the needed folders for our Nagios config files and set the appropriate permissions.Defaultcollector.Then Set the required permissions.Defaultcollectorsudo mkdiretcnagios.DefaultcollectorThen Set the required permissions sudo chmod.Defaultcollector.Now we need to configure our deployment.Un comment and edit the following 3 sections where highlighted.Save Exit. 8. In order for our Apache web user to issue the Nagios reload command using sudo, Well need to edit the sudoers file and give www data rights.Then we add the following line to the end of the file Allow www data apache user to reload nagioswww data ALLNOPASSWD etcinit.Save Exit. Then Reboot.Finally, After the reboot.We can test our Nconf install.Browse to http Nagios.PiNconf. Make any quick change to the config add a host, service, edit a setting Click Generate Nagios ConfigIf there are no errors, You will have the option to Deploy the new Nagios Config.Reference. learnmorelearnmore captionInstalling Mk Live.Status Nagvis. Install Mk Live.Status Nagvis Requirements.Set the appropriate permissions for use later.R www data www data varlibnagios.R varlibnagios. Rwww data www datavarlibnagios.Rvarlibnagios. Configure Nagios to use MK Livestatus.Add the following to the end of the file.After Nagios is restarted, the socket should be in place Restart Nagios.You should see a file called Live.This will be our last step before we start installing Nagvis.Here we want to set the proper permissions for Nagvis to be able to access our Live.Download Extract Nagvis.Nag. Vis2. 01. 7nagvis 1.C opt. cd optnagvis 1.Make the Install script Executable.Nag. Vis2. 01. 7nagvis 1.Coptcdoptnagvis 1.Make the Install script Executablesudo chmodxinstall.Then to Start the Install.Ive included a screenshot of my responses to the install script to make this section easier to follow.Here are the 4 major prompts you will want to keep an eye on.Nagios Base Path etcnagios.Nagvis Base Path etcnagvis.Use Make Live. Status Yes.Make Live. Status Socket Unix varlibnagios.After the install is complete, You will need to reboot Apache.Finally, run the following commands to fix nagvis permissions.When you are done, you should be able to access Nagvis.Nagios. Pinagvis.User admin. Pass admin.Reference. learnmorelearnmore captionInstalling Rasp.Control. Nothing special Here, Great directions for installing Rasp.Control are on their Git.Hub Page. Image Change Log Nagios.Pi v. 1. 0. Installed Configured Nagios, Nconf Nagvis.Created Nagios. Pi Landing Page.Set hostname to Nagios.PiInstalled PHPmyadmin.Installed Rasp. Control.Nagios. Pi v. 1. Fix Rasp.Control Logo on Landing Page.SetupConfigure Postfix.Fixed notify by mail command paths.Nagios. Pi v. 2. Misc.Nagios. Pi v. 2. Misc.Nagios. Pi v. 2. Fixed permission issues with Nagvis.Updated image to be compatible with latest models of the Raspberry Pi.Reduced image size.Additional Information Configuring E mail NotificationsinternalPlease note that you will have to make these changes manually as described below until v.Install Post. Fix.Now we should be able to send a test e mail internally.If you are getting IPv.You canforce postfix to use ipv.Add this Line to EOFinetprotocols ipv.At this point you should be able to successfully send e mail via postfix.Next we will want to make sure that Nagios can send successful notifications as well.The first thing we will need to do, Is fix the mail path command used by Nconf.Misc Commands modify hosts via email Edit.Change the listed command to.Nagios nn. Notification Type NOTIFICATIONTYPEn.Host HOSTNAMEn. State HOSTSTATEn.Address HOSTADDRESSn.Info HOSTOUTPUTnn.DateTime LONGDATETIMEn usrbinmail s NOTIFICATIONTYPE Host Alert HOSTNAME is HOSTSTATE CONTACTEMAIL1usrbinprintfb Nagios nn.Notification Type NOTIFICATIONTYPEn.Host HOSTNAMEn. State HOSTSTATEn.Address HOSTADDRESSn.Info HOSTOUTPUTnn.DateTime LONGDATETIMEnusrbinmail s NOTIFICATIONTYPE Host Alert HOSTNAME is HOSTSTATE CONTACTEMAILThe important change here is that we change the binmail path to usrbinmail.That really should be all it takes.I would go ahead and setup a test host within Nconf and deploy it to Nagios to make sure that E mail Notifications are indeed working properly.By default there is a example alert for linksys srw.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |