Home
op5 Monitor administrator manual
Contents
1. eeeeeeeeeennnnn 87 Creating the plugin s ooo te acit beeper ad eon RE ei iua 87 Configuring op5 Monitor to use the plugin seeeeeess 87 Creating a more complex plugin eeeeeeeeeeeeeeneeeeennnnnn nnn 88 More info mat ON C 89 Widgets About leor 91 iv Contents IritrOdU C HOT nna nein rosae em radon ne in aa 92 The widget Da51G5 i cierre riora poa rti deae raro orit bee ei eV Pixar Fe bUR ina icep RES deer 93 Tie Widget rules eu deett eie dips es ue sae eoa ten 93 MIX EET 93 Widget Class dein tate t ep a da dn dnd us 93 VIGW filo cree eee URP RI RADO RE P mt 94 Writing a simple WIdget sonst tecto xao ke conr a a6 oin DAP EX KRRK a cde L Ew ada Lac 95 Creating the directory structure esee 95 Writing the widget Tile cx edet siio doeet xoa itae Menten eda ee 95 Writing the view Tile en caret Pacto bride ina deben ka dund 96 Multiple instances istaec ttd cene Lt oe ed Lose taaie erie 96 Adding the widget to the widget table eeseeeees 96 Removing a widget ode in La eere esto ote tes delecti aiii had ei ure 97 Viewing pi X Tem RI Em 97 Take your widget a step further essence 98 Packaging your Widgolt ietuiiis rmi et d d dxerh asa edi m caxa ina cl Enn cix ami ve Eon e Lada 99 Creating the Manifest xml eeec
2. essen 146 Creating custom notification skins eeeeeeeesssesesseseesseseeeeeeeees 147 V vi Contents Dial up notification nicer nnn rna rn nnn nnn enne nnne nn eran 149 Adding a dial up notification command sseeeee 149 Configuring the contacts crece bee urere nhe emet ne teer 150 SNMP trap notifications LLeeeeeeeeeeeeeeeeeeeeeeeeesseeeenee nennen nennen nnn nnne nnn 151 Adding SNMP notification Commands see 151 Configuring the contacls erepto ERR RR IRE ER RETRO dE 152 LDAP authorization About LDAP authorization ssssssssssssseeeenennee enn 153 IntrodUctlon en erret nor nonno tnn hen rra rn ena EY rna EVEN aa 154 Before We Start iste icccisccetectcevecivveicsetivestedcscecesecetevisssvssteveltedehectspsedezsaduvesivesticczes 155 Do not use space in the admin group name ccccecceecceeeeeeeeeeeeeeeeeees 155 Preparing your Active Directory eeeeeeeeeeeeeeeeeennneeeen nnns 156 Configuring op5 MOHILOF iiscco iioii SE ct bh ari Eun sec De YR a tua epa E t FIVE Ra SE o EE CENE EE 159 Local authentication fallback ssssss RH 160 Backup About backup edet ii exe Pot ten egent iA aati ares 163 IntrodUuctlon e ciere in neni erra enne ern ira ax unn 164 Backup Restore actions ccccccccccsccccecceccceeceeeceeceeee
3. Remove all peer configuration from peer02 mon node ctrl peer02 mon node remove peer01 mon node ctrl peer02 mon node remove peer03 Restart monitor on peer02 mon node ctrl peer02 mon restart Remove peer02 from the rest of the peers in this case peer03 mon node ctrl type peer mon node remove peer02 Restart the rest of the peers in this case only peer03 mon node ctrl type peer mon restart Remove peer02 from the host you are working from mon node remove peer02 Restart monitor on the host you are working from mon node ctrl mon restart File synchronization To synchronize files between servers add a sync paragraph in the file opt monitor op5 merlin merlin conf 12 1 Scalable Monitoring C op5 Load balanced monitoring In the example below we will synchronize the htpasswd users file to the peer peer01 peer peerO1 address ip port port sync opt monitor etc htpasswd users opt monitor etc htpasswd users Note that this is done per peer More information For more information and a more complex example please take a look at the howto in the git repository of the opensource project of Merlin C op5 1 Scalable Monitoring 13 Merlin Merlin About Merlin is the backend engine for a load balanced and or distributed setup of op5 Monitor Merlin or Module for Effortless Redundancy and Loadbalancing In Nagios allows the op5 Monitor processes to e
4. To tell the master not to connect to the poller and let the poller open the session we need to add a option to the file opt monitor op5 merlin merlin conf Under the section for the poller that the master should not try to connect to add the following connect no Example In the example below we have a master master01 that can not connect to poller01 but poller01 is allowed to connect to master01 poller poller01 address lt ip gt port lt port gt contact_group lt contactgroup gt connect no Is is also possible to set this option on the peer instead then the master will always initiate the session After a poller as been unavailable for a master i e of network outage the report data will be synced from the poller to the master 1 Scalable Monitoring C op5 Distributed Monitoring The report data on the poller will overwrite the data on the master system More information For more information and a more complex example please take a look at the howto in the git repository of the opensource project of Merlin C op5 1 Scalable Monitoring Load balanced monitoring Load balanced monitoring Introduction The op5 Monitor back end can easily be used as a load balanced monitoring solution The load balanced model looks like this oos dil a e LN Fell Peer or 2 Config gt 3 e tt Emm Check results Monitored objects Poll
5. To import a nagios 3 configuration we need to prepare the nagios configuration files first after that we can use the import script to import the files into op5 Monitor Preparing nagios configuration Log in to the nagios server via ssh or locally Create a new file called templates cfg in which you manually add both your host templates and your service templates These are usually located in hosts cfg and services cfg Create a nagios pre cache file by stopping nagios and start it with the p option this is done from you nagios binary directory usually usr local nagios bin service nagios stop nagios pv path to your nagios cfg gt This will create a file called objects precache in your var directory under your nagios installation Import nagios configuration Make sure op5 monitor is stopped mon stop Copy the files to the correct directory on your op5 Monitor server File To folder objects precache opt monitor templates cfg opt monitor nagios log opt monitor var log archive opt monitor var archives Run the import script php opt monitor op5 nacoma import reduce php cfg file opt monitor templates cfg object cache opt monitor objects precache Do a config test on the imported configuration service monitor configtest If you have any errors these needs to be resolved before we can continue with starting the op5 monitor service When there are
6. Click Contact templates Contact templates Give the contact template a name Q name on call template Change can submit commands to yes i can submit commands Yes i Click Apply changes Click Save Adding a contact To add a contact 1 Click Contacts on the main page Contacts 1 This gives this the user connected to this contact the possibility to execute com mands like acknowledge problems etc 48 1 op5 Monitor configuration tool C op5 Managing objects 2 Usethe template on call template we created in Adding a contact template on page 47 Q template on call template H 3 Typeinacontact name contact name johnd 4 Typeinan alias Gi 5 Type in the email address Q email john doe example org 6 Click Apply changes 7 Ifyou want to create access right check the Configure access rights for this contact otherwise save changes P enable_access __ Configure access rights for this contact 8 When Configuring access right for this contact select the access rights the contact should have after that save the changes r3 Password Ld Repeat __jauthorized_for_system_information authorized_for_configuration_information _jauthorized_for_system_commands Jauthorized for all services Jauthorized for all hosts authorized for all service commands authorized for all host commands _ Select all L3 Role E Ld enable access M Configure access rights for this contact
7. Services on page 27 Contacts on page 29 Access rights on page 31 Admin Roles on page 32 Time periods on page 37 Commands on page 40 Plugins on page 40 Groups Using templates 41 45 Host groups on page 41 Service groups on page 42 Contact groups on page 43 How they work on page 45 17 18 1 op5 Monitor configuration tool C op5 Subject Page Subsections Managing objects 46 Before you start on page 46 Contacts on page 47 Hosts on page 49 Services on page 55 Escalations on page 63 Access rights and contacts on page 67 Make things easy 68 Profiles on page 68 Cloning objects on page 68 Copy objects on page 69 Propagate settings on page 70 Time periods 74 Add a time period on page 74 Macros 75 Pre defined macros on page 75 Custom macros on page 75 Features not supported T7 by Configure C op5 1 op5 Monitor configuration tool 19 Introduction Introduction There are two ways of changing the configuration of the op5 Monitor Editing the configuration files in opt monitor etc Using the web UI op5 Monitor configuration tool In this chapter we will take a look at how the op5 Monitor Configuration tool from now on called only Configure is used Workflow All configuration in op5 Monitor is saved in configuration files text files in opt monitor etc The Configure works with a database and this makes it possible to do any changes
8. Tests various aspects of event forwarding with any number of hosts services peers and pollers generating config and creating databases for the various instances and checking event distribution among them For complete list of option run mon test help Pasv mon test pasv options Submits passive checkresults to the nagios cmd pipe and verifies that the data gets written to database correctly and in a timely manner For complete list of option run mon test help This command will disable active checks on your system and have other side effects as well C op5 VRRP About Setup 1 Scalable Monitoring 23 VRRP VRRP can be used in this setup to have one DNS name and one IP address that is primary linked to one of the master servers and if the primary master for some reason is unavailable VRRP will automaticly dectect this and send you to the secondary master To enable VRRP on you master servers follow the steps below In this example we have two masters that we want to use VRRP with The VRRP IP will be 192 168 1 3 and we will bind that IP to the network interface ethO The IP and inferface will have to change to match your network configuration If you already use VRRP in your network make sure that you use the correct virtual router id Edit etc keepalived keepalived conf On the primary master vrrp instance VI 1 State MASTER interface etho virtual router id 51 priority
9. Host name and service description i mysql Mysql srv1 PING System Load Save Click on the Save icon E Add a group as sub element Select the type of rule set the group shall have Then follow the steps in Creating a new group on page 135 Rules types There are currently 6 different rule types to choose from each group has their unique rule set Group Description Worst state Returns the worst state of all its sub elements Best state Returns the best state of all its sub elements At least Returns OK if at least one sub element are OK 1 Business Process 137 C op5 Worst state Best state Business groups Group Description At least 2 Returns OK if at least X sub elements are ok and WARNING if Y sub elements is OK Threshold Returns WARNING or CRITICAL if X or Y numbers of sub elements are not in OK state Scores The state depends on the number of points scored by its sub elements Custom Custom rules sets can be created Group state will be the worst state of all its sub elements Examples Best State of OK WARNING CRITICAL gt CRITICAL Best State of OK WARNING CRITICAL UNKNOWN gt UNKNOWN Group state will be the best state of all its sub elements Examples e Best State of WARNING CRITICAL gt WARNING BestState of OK WARNING CRITICAL UNKNOWN OK Simple At least Means to express the idea that you need s
10. If you have created widgets in op5 Monitor prior to 5 6 they will not work out of the box Therefore we have created a porting guide to make your homebrewed widgets to work in op5 Monitor 5 6 and later This information can also be found in your op5 Monitor installation opt monitor op5 ninja applications widgets PORTING GUIDE Javascript View In old style widgets you usually needed to create a Javascript file with the following content document ready function var my widget new widget my widget widget content D If that was all your javascript file contained you can now safely remove it If it did more things you may no longer initialize the widget yourself but must instead wait for the widget system to load your widget widget register widget load my widget function var my widget this If your javascript also kept track of your custom configuration options that too can likely be removed see Extra Settings on page 106 If you do custom things to your javascript you may need to adjust it should you want to make it possible to create multiple instances of the widget This is described in Multiple Instances on page 107 Old widgets that supported ajax refreshes all had to copy paste the following lt php defined SYSPATH OR die No direct access allowed gt lt php if ajax_call gt C op5 1 Widgets 103 Widget Porting guide div class
11. L3 Access Levels 9 Select Role if a admin role should be enabled for this contact For more information see Admin Roles on page 32 Modify a contact To modify a contact 1 Click Contacts on the main page 2 Choose the contact you like to modify in the drop down list Filter by regular expression mw 199 co Clear C op5 1 op5 Monitor configuration tool 49 Managing objects 3 Click Go 4 In the view you will get only directives differ from the template will be shown To change the other directives click Advanced Advanced Make your modifications and click Apply changes Click Save Delete a contact 1 Click Contacts on the main page Contacts 2 Choose the contact you like to modify in the drop down list Filter by regular expression momo 18 co 3 Click Go 4 Click Delete Clear Delete 5 Click Save Hosts There are many ways to add a host A host can be added by the new host wizard anetwork scan e cloning of a host using a profile In this guide we only describes the directive we will not use the default value in Adding a host with new host wizard To add a new host using the new host wizard Part 1 1 Click New host on the main page 50 1 op5 Monitor configuration tool C op5 Managing objects 2 Typeinahost name E host name example hosti 3 Typeinan alias d alias Example Hostl 4 Typein the address to the host IP address is mostly the b
12. More information on page 8 Load balanced 9 Introduction on page 9 monitoring Before we start on page 9 The configuration on page 10 More information on page 12 Merlin 13 About on page 13 Merlin components on page 13 The mon command 15 About on page 15 The commands on page 15 Start on page 15 Stop on page 15 Restart on page 15 Ascii on page 15 Check on page 16 db on page 17 ecmd on page 18 Log on page 18 Node on page 19 oconf on page 20 SSHKey on page 21 Test on page 22 1 Scalable Monitoring C op5 Subject VRRP Page 23 Subsections About on page 23 Setup on page 23 Activate VRRP on page 24 C op5 1 Scalable Monitoring Distributed Monitoring Distributed Monitoring Introduction The op5 Monitor back end can easily be configured to be used as a distributed monitoring solution The distributed model looks like this Check results Poll check Monitored objects Monitored objects Monitored objects In the distributed monitoring solution e all configuration is done at the Master all new configuration is distributed to the pollers e each poller is responsible for its own host group Site e the Master has all the status information Before we start There are a few things you need to take care of before you can start setting up a distributed monitoring solution You need to make sure e youhave at least two op5 Monitor servers of the same architecture up and
13. Prerequisites You have a contact that we call jsmith that is member of contact group Database that is assigned to a number of hosts in a hostgroup 1 Goto Configure gt Access Rights Configure This is the op5 Monitor Configuration tool the place where you add new hosts change notification setti handle contacts and so on Basically just about every configuration related setting is managed from this To get started select the prefered action below 5 New hosts Templates 9 Host Groups Service Groups Contacts amp Contact Groups Commands Profiles WW Time Periods Access Rights Admin roles 1 Network Autoscan PNP Special Template PNP Pages ey Export hosts to statistics 1 op5 Monitor configuration tool 35 C op5 Main objects 2 This contact has the access rights authorized for system information authorized for configuration information and authorized for system commands New User 3 Username 3 Password Password Access uj Levels jsmith Sj authorized for system information authorized for configuration information g authorized_for_system_commands authorized for all services authorized for all hosts authorized for all service commands authorized for all host commands Select all 3 Click Apply Changes 4 Then go to Configure 4 Search Updated 2011 09 08 15 09 15 amp Ee Msi 36 1 op5 Monitor configuration tool C op5
14. Translation Memory Parsers Identity Your name and email set below are only used to set the Last Translator header of GNU gettext files qe Your email address Change UI language Automatically check for new version of Poedit GOED ce 122 1 Localization Adding a new language C op5 Adding a new language In this example we will create add a new language swedish We will also use the Poedit tool and work with the files locally on our workstation and then copy the new language files to the op5 Monitor server To add a new language 1 2 Copy the language folder to your workstation Create a new folder inside the language folder with the short name of the language you like to create mkdir sv Copy the files from the en folder english to the new one and rename them to the same name as the folder like this cp en en mo sv sv mo cp en en po sv sv po Start up Poedit click Open and locate your new po file 000 Poedit Ena set Open Save Update Fuzzy Comment 0 gt es MIU G3 sv E Q Y DEVICES T3 E Macintosh HD Ei iDisk sv mo Y PLACES Desktop a A Applications 3 Documents L DI Documents ff Downloads Enable GNU Gettext catalogs po ry PA C op5 1 Localization 123 Adding a new language Mark the line you like to add your translation to and type in the field at the bottom of the wi
15. stopped and has there fore left the flapping state DOWNTIMESTART The host or service has entered a scheduled downtime DOWNTIMESTOP The host or service has left a scheduled downtime DOWNTIMECANCELLED The scheduled downtime for a host or service has been cancelled The list of macros described in the Nagios manual is very useful when you are working with new notification commands and scripts That list can be found here http nagios sourceforge net docs 3_0 macrolist htm op5 1 Notifications 145 How does notifications works Notification e mail sender Notifications are by default sent from the e mail address op5monitor without any domain The MTA adds the local domain name witch by default is localhost localdomain To change the e mail address that notification are sent from use the from mail argument for the notification command To change the sender e mail address from opS5monitor localhost localdomain to opSnotification mycompany com simply go to the check command for the host notify and add from email op5notification mycompany com without the signs command name host notify command line USER3 notify poller notify send pl from email op5notification mycompany com c SCONTACTNAMES h SHOSTNAMES f SNOTIFICATIONTYPES m SCONTACTEMAILS p SCONTACTPAGERS HOSTALIAS SHOSTALIASS HOSTADDRESS SHOSTADDRESSS HOSTSTATE SHOSTSTATES HOSTSTATEID SHOSTS
16. 2008 06 01 14 means every 14th day from first of june 2008 Note that this exception has no end Hours Which time to include for this exception You can define multiple times by separating them with comma Example 00 00 01 00 03 00 06 00 40 1 op5 Monitor configuration tool C op5 Main objects Commands Directives Plugins A command is exactly what it sounds like It can use macros and arguments Mostly they are used with services but they can actually be used as service or host check command e notification command event handler e Obsession A command has got only two directives command name command line Directive Description command name This is the id of the command and also the name shown in Configure command line is the actual command line used by the services notifications event handlers and obsession Plugins are compiled executable or scripts that can be run from a command line to check the status or a host or service There are many plugins included in the op5 Monitor software A list ofthe plugins can be found in the list of plugins at the support section at www op5 com If you are looking for a plugin not found in op5 Monitor by default there are a bunch of other places to look e contact op5 for a specific development e WWW Op5 org e exchange nagios org You can use any plugin written for Nagios but you might need to modify them a bit before they
17. Main objects Example 5 Click Admin roles ers Fill out the configuration options in all fields DBA Admin Available peter janj limit 123 monitor peter mob test Available Full access Only contacts can access No access Available Full access Selected jsmith Selected Disallow editing of existing objects Disallow creating new objects Selected Only contacts can access Disallow editing of existing objects Disallow creating new objects No access Note If you leave a field empty Full Access will be implied When combining several different permissions the role s members will only get access to the objects that are allowed according to all of the permissions If at least one permission is selected and none of the permissions is either Allow all or Disallow all then an Allow all will be implied That is if you choose only Disallow creating new objects that gives the role permission to edit all existing objects Leaving a permission empty means it will fall back to the permission in the default role Only contacts can access roughly means that whatever is visible in Ninja will be visible here These permissions have no effect if a user is authorized for all hosts in Access Rights In this case we will create a role called DB Admin that only will have access to the hostgroup Databases This role can edit services on hosts in this hostgroup add new services to the hosts
18. Now try to login to the op5 Monitor user interface with the user you added to the opS5admin group in To prepare your Active Directory on page 156 Local authentication fallback If for some reason the LDAP server is no longer available we can set up a local authentication fallback The different authentication methods is Name Description Ninja Local authentication with Ninja op5 Monitor LDAP LDAP authentication with LDAP AD Apache This will trust the Apache authentication setup This can be used to authenticate with Kerberos To set up this you first need to copy the authentication configuration file in witch we add the wanted authentication method with it s fallback method cp opt monitor op5 ninja application config auth php opt monitor op5 ninja application config custom Edit the file auth php with your favorite editor Edit the config driver string to use an array in which we specify the wanted authentication methods The format of the string look like this when only using two authentication method Sconfig driver array authentication method name gt gt lt Display name gt lt fallback authentication method name gt gt lt Display name gt C op5 1 LDAP authorization 161 Configuring op5 Monitor The firtst authentication method in the list will be the default method For example when setting up a LDAP login with a local fallback the string can lo
19. OK Sample Period 60 sec Average CPU 2008r2 2 x ample Peri sec Average 200822 Q cPuusage 2012 04 12 10 51 04 21s v3 Utilisation 0 96 AIR OK C Total 99 90GB Used 16 83GB QU DiskUsage C A jw 2012 04 1209 49 49 th 6m 36s 3 46 8 Froo 83 07GB 83 2 E OK Physical Memory Total 4 000GB Used Q MemoryUsage A is 2012 04 12 10 50 56 5m 29s 13 0 817GB 20 Free 3 183GB 80 OK Sample Period 60 sec Interface Red Hal VirtlO Ethernet Adapter Network Usage Speed 1 001Gbit s Byte Send Red Hat VirtlO z Rate 0 039MB sec Byte Receive O Eno 2012 04 12 09 46 44 1h am 4is Ms Rate 9 635KB sec Packet Send Adapter Rate 68 000packet sec Packet Receive Rale 70 000packeUsec Oulput Queue Length 0 Packets Recelved Errars 0 Page File OK Total 3 999GB Used 0 0008 0 v Us ge A uw 2012 04 12 09 46 40 1h 4m 45s 13 Free 3 999GB 100 Peak Used 0 0008 veage 0 Peak Free 3 999GB 100 Q pinc f 2012 04 12 10 46 51 4m 34s 13 OK 172 27 86 105 rta 2 666ms lost 0 Escalations Escalations let you configure escalation of notifications for this host The idea is that if you have a really important host you can send the first notification to the default contact group in order for them to solve the problem Ifthe problem is not solved in lets say 30 minutes you can send the notification to a broader range of contacts 64 1 op5 Monitor configuration tool C op5 Managi
20. OK WARNING CRITICAL gt WARNING e Atleast 3 2 num of OK WARNING WARNING CRITICAL gt CRITICAL Atleast 3 2 num of OK WARNING WARNING WARNING gt CRITICAL Means to express the idea that you can tolerate some amount of problems Two thresholds are specified either in percentage or actual among If number of problematic sub elements is greater or equal to the CRITICAL threshold then group is CRITICAL If number of problematic sub elements is less than CRITICAL threshold but greater or equal to the WARNING threshold then group is WARNING If number of problematic sub elements is less than the WARNING threshold then the group is OK Examples e At most 2 1 num of OK OK WARNING CRITICAL gt OK At most 3 2 num of OK OK WARNING CRITICAL gt WARNING e At most 3 2 num of OK WARNING WARNING CRITICAL gt CRITICAL At most 3 2 num of OK WARNING WARNING WARNING gt CRITICAL C op5 Scores 1 Business Process 139 Business groups Means to express the idea that having several WARNING sub elements is the same as having few OKs and few CRITICALs Groups sums the problems points of all its children using OK state gives 0 problems points WARNING 1 CRITICAL 2 UNKNOWN 3 Then checks it against two specified thresholds If sum is less than the WARNING points then group is OK if sum is between the WARNING and CRITICAL points then group is WARNING if sum is greater o
21. Scan for more service button Click Save Scan for service using WMI Scan for services using Windows Management Instrumentation has a number of dependencies to be able to work WMI enabled on the windows server User account on the windows server with sufficent privileges There are two ways to scan for WMI on a windows host When adding a new host Scanning a existing host 62 1 op5 Monitor configuration tool C op5 Managing objects Scanning for WMI when adding a new host To scan a host for WMI counters and services upon adding the host to your op5 Monitor configuration as partly described in Adding a host with new host wizard on page 49 To scan for WMI counters when adding a new host 1 Select Configure in the main menu 2 Click on New Hosts 3 Enter the information about the host 4 Select the checkbox Add WMI _ Add UNIX Client Services NRPE _ Add Windows Client Services NSClient Add Sensatronics E4 Add Sensatronics EM1 Ld Service Checks Add NetWare Client Services NWStat R Add WMI WMI Username administrator WMI Password eccccse 5 Enter username and password 6 Press Add Services _Ad services 7 Select the services you wish to add from the list v Initial service settings i L3 template default service 1 Force template values View template valu Available Sc network group fm Ld contact groups printer group l support group unix group Ld file id etc se
22. You now add a method to the controller options and have it return an array of your extra options This is the last example widget again but with two extra settings php defined SYSPATH OR die No direct access allowed class My widget Widget extends widget Base public function options Soptions parent options Soptions new option my widget your widget name or Something else unique optionl a unique option name this translate My first option your label input option type input checkbox dropdown etc array size gt 5 extra attributes for the field defaulti default value Soptions new option my widget option2 My second option input array size gt 5 default2 return options C op5 1 Widgets 107 Widget Porting guide public function index fetch widget view path view path this view path view current status this get current status Sarguments this get arguments Actually do stuff ay require view path Note This will automatically create javascript to save any changes and refresh the page on changes If you want to do this manually you must call should render js false on the option object Note If you want to you can return a pure HTML string of the widget settings you want to keep track of That way you will get to do everything yourself Multip
23. a description about how to use the op5 Monitor Configuration CLI 32 1 op5 Monitor API and CLI op5 Monitor Configuration CLI C op5 C op5 About Wiki This chapter covers the following topics W k Subject Page Subsections Introduction 2 Managing wiki pages 3 Create a wiki page on page 3 Deleting a wiki page on page 3 1 Wiki C op5 Introduction Introduction In op5 Monitor there is a wiki included witch can be used for documenting hosts and services Wiki pages can be created for both hosts and services The wiki has a built in version revisioning this can be used to track changes in wiki pages and restore an older version It is also possible to view changes between versions The wiki can be used for documenting hardware information serial numbers and other information regarding a host or service It can also be used to document workflows and how to act when there is a problem with a host or service The official docuwiki manual can be found here http www dokuwiki org manual 1 Wiki C op5 Managing wiki pages Managing wiki pages Create a wiki page To create a wiki page for a host or service 1 kb WO N on oO OC Go to Configuration Go to the host or service you want to create a page for Click on Advanced Scroll down to notes_url and click Use wiki This will add a notes url to a wiki page SCREENSHOT Click Ap
24. a windows host for services e Using the windows agent NSclient e Using WMI Windows Management Instrumentation The following sections will describe how to accomplish this using the different techniques Scan for services using agent Adding a service that checks a windows services is many times harder than you think You need to have access to the windows server know the exact name of the windows service With op5 Monitor you do not need to do anything more than make sure the latest agent NSClient is installed and follow the next few steps To add windows services 1 Open up the host in Configure you like to add new services on 2 Click Scan host for Windows Services C op5 1 op5 Monitor configuration tool 61 3 4 oN OO Oi Managing objects Choose which server to preform the scan Related items amp Scan host for network services This server Scan This server Maces w Scan host for Windows Services Select the Windows Services you like to add as a new service in op5 Monitor Select services Filter by regular expression Clear AeLookupSvc Selected Browser Eventlog CryptSvc DcomLaunch dmserver Dnscache ERSvc helpsvc IAS gt lanmanserver lanmanworkstation LmHosts LogRelay PlugPlay PolicyAgent service description Add Selected Services Give the new service a Service description Click Add Selected Services Click either the service link or the
25. all service commands op5admin authorized for all host commands opb5admin See that despite the user kalle kula being a member of admins he does not get included because the script doesn t look for users in the Users Container only in the op5 Operators OU Now say that we want to have all our users in the User Container and just keep two groups in the op5 Operators OU we can change the LDAP_USERs variable in opt op5sys etc ldaprights cfg to LDAP USERS cn Users dc webinar dc op5 With the above configuration this results in the following cgi cfa authorized for system information kalle kula authorized for configuration information kalle kula authorized for system commands kalle kula authorized for all services kalle kula authorized for all hosts kalle kula authorized for all service commands kalle kula authorized for all host commands kalle kula 158 1 LDAP authorization C op5 Preparing your Active Directory As you see now the users from the op5 Operators OU don t get included despite being members of the correct groups because we told the script to look for users in the Users container instead C op5 1 LDAP authorization 159 Configuring op5 Monitor For the next steps you will need root access to the machine running op5 Monitor either via console or ssh Configuring op5 Monitor In this example the DC server has the following ip address 192 168 1 97 The DC is running a pretty much
26. apply to the most objects that are possible to copy Propagate settings To change the same directive on many objects of the same type can be a really time consuming work This is where the propagate function in op5 Monitor is very handy With the propagate function you can copy the value of a directive from one object to one or many other objects of the same type In the guide below we will use the propagate function to copy the parents from one host to a couple of other hosts To propagate a value of a directive 1 On the start page choose the host you like to propagate a directive value from in the drop down list Edit Host Filter by r ar expressior Clear gbg fw1 1 Go 2 Click Go C op5 1 op5 Monitor configuration tool 71 Make things easy 3 Click Propagate Propagate Now you will see a check box in front of every directive like this O parents Check the check box for parents and click Propagate selected settings 5 Select the host objects host or whole host groups you like to propagate the settings to Propagate parents router1 Host objects Select hosts in the following hostgroups Availiable Sek Environment Environment network Routers Switches printers Printers Z G unix servers Unix Linux Servers p Select hosts Filter by regular expression Availiable Sek down 1 down 1 environment1 Environment Probe example_host An example host 1 hast all ok hast all ok 6 Se
27. as shown below public function index echo Hello World While you could print your widget content from the index function as above it s better to move your content to a separate view file to distinguish functions and content If you create the file view php with the content Hello World then you include it from your index function in the widget file by changing it to public function index require this gt view_path view More about these sections in Writing a simple widget on page 95 C op5 1 Widgets 95 Writing a simple widget Writing a simple widget In this example we will create a small hello world widget We will assume you have ssh access to the server required knowledge about PHP knowledge about how to use an editor in a Linux environment We does also assume that you before you start log in to the op5 Monitor server Creating the directory structure To create the directory structure 1 2 Go tothe application folder cd opt monitor op5 ninja application Create the following folders mkdir p custom widgets hello_world mkdir custom widgets hello_world css mkdir custom widgets hello_world images mkdir custom widgets hello_world js Writing the widget file To write the widget file 1 2 3 Go to the widget folder cd opt monitor op5 ninja application custom_widgets hello world Create a file with your favorite editor called hel
28. commands for all ommands hosts se Customizing views below for more information Recommended settings Recommended settings for anadministrator would be to check all boxes e help desk staff it could be authorized for system information authorized for system commands so they can acknowledge problems but not change the configuration Admin Roles Admin roles make it possible to create a role with more fine grained permissions than with Access Rights When combining several different permissions the role s members will only get access to the objects that are allowed according to all of the permissions C op5 1 op5 Monitor configuration tool 33 Main objects If at least one permission is selected and none of the permissions is either Allow all or Disallow all then an Allow all will be implied That is if you choose only Disallow creating new objects that gives the role permission to edit all existing objects Leaving a permission empty means it will fall back to the permission in the default role and that grants full access The option Only contacts can access roughly means that whatever is visible in op5 Monitor will be visible in the configuration New role 4 role name Limited Available Selected 123 limit 123 4 role members Jan monitor peter peter mob test A role can be used to limit access to the following configuration objects Variable Function Ro
29. commands to service notify by snmp Click Apply Click Save Note Make sure the contact is a member of the contact group is associated with the correct objects C op5 LDAP authorization About LDAP authorization This chapter covers the following topics fallback Subject Page Subsections Introduction 154 Before we start 155 Do not use space in the admin group name on page 155 Preparing your Active 156 Directory Configuring op5 159 Monitor Local authentication 160 153 154 1 LDAP authorization C op5 Introduction Introduction Microsoft Active Directory is used to share user list provide single sign on and other central features in large Microsoft based workstation and server networks Active Directory is Microsoft s implementation of existing business standards such as LDAP Kerberos and DNS The purpose of this chapter is to provide a step by step guide on how to integrate op5 Monitor authentication with Microsoft Active Directory C op5 1 LDAP authorization 155 Before we start Before we start To be able to complete this how to you will need Administrator access to a working Microsoft Active Directory environment e Root command line access to a running op5 Monitor Do not use space in the admin group name Please refrain from using spaces in the admin group name as this can cause problems If your admin group and users reside in an OU con
30. dir opt monitor etc oconf conf opt monitor etc nagios cfg mon node ctrl sed i cfg file d conf mon node ctrl sed i log file acfg dir dir conf mon node ctrl mkdir m 775 dir mon node ctrl chown monitor apache dir 6 To make sure you have an empty configuration on poller01 mon node ctrl mon oconf hash This will give you an hash looking like this da 39 hash da39a3ee5e6b4b0d3255bfef95601890afd80709 1 Scalable Monitoring C op5 Distributed Monitoring Now push the configuration to the poller mon oconf push Restart and push the logs from master01 to poller01 mon restart sleep 3 mon log push Adding a new poller In this instruction we will add a new poller to our distributed solution Here we have the following hosts masterol poller01 pollero2 This is the new one To add a new poller 1 2 Log in to the master over ssh as root Add the new poller to the configuration with the following command mon node add poller02 type poller hostgroup gbg Create and add ssh keys for the root user mon sshkey push poller02 mon sshkey fetch poller02 Add master01 as master at poller02 mon node ctrl poller02 mon node add master01 type master Set up the configuration sync dir opt monitor etc oconf conf opt monitor etc nagios cfg mon node ctrl poller02 sed i cfg file d conf mon node ctrl poller02 sed i log file acfg dir dir S conf mon node ct
31. editor At the top of the file common css you will find the following lines on text decoration none font size 1 0em outline none padding 0 margin 0 Change font size 1 0em to font size 1 02em Save and exit from the editor Refresh the op5 Monitor user interface in your browser and you can see that the default font is a bit bigger now 116 1 GUI themes Making changes in the user interface C op5 C op5 About user menus This chapter covers the following topics User menus Subject Page Subsections Custimize user menus 118 117 118 1 User menus C op5 Custimize user menus Custimize user menus It is possible for a administrator to custimize users menu Only user with full access can edit user menus To change a specific users menu go to My Account in the menu and click on Edit user menu Select the user you want to change the menu for You can now hide the options in the menu that you don t want to be visible for that specific user In the example below we have removed op5 Support portarl View Config and Configure options Edit user menu Select the user below to edit the menu for Username jsmith Check the menu items that the should not be visible to the selected user MENU ITEM REMOVE About S op5 Porai LL B op5 Monitor manual O Monitoring h Tactical overview Wh
32. file CPU Usage php Title Comment Type area Service CPU Load Hosts Filter by regular expression merlin stress3 merlin ctracea merifmedinestesss mirror int op5 se mon int op5 se mysql printer gbg repos op5 com sth fw1 switch1 gbg switch1 sth temp1 gbg int op5 se ticket18531 vmware sth win gbg win2008 i386 win2008 i386 core win2008 x86 64 win2k3 R2 i386 Click on Save Clear 4 Selected win2k3 R2 x86 64 windows2003 gbg The combined graphs can be found under Graphs in the main menu F Graphs and under Combined Graphs All the combined graphs can be found under Combined graphs in the right side menu Combined Graphs 4 Disk Usage i pingtimes 4 CPU Usage 132 1 Graph templates Combined Graphs C op5 C op5 About Business Process Subject Page Subsections Introduction 134 Introduction on page 134 Business groups 135 About business groups on page 135 Creating a new group on page 135 Creating a sub element on page 136 Rules types 136 Rules types on page 136 133 134 1 Business Process C op5 Introduction Introduction The business process view is designed to combine your IT monitoring and your business service management BSM to give an overview of the applications and or services that your organisation is providing either to customers or internally C op5 1 Business Process 135 Business grou
33. given and will otherwise specify threshold values Only one directory at a time may be checked Cores mon check cores warning X critical X dir Checks for memory dumps resulting from segmentation violation from core parts of op5 Monitor Detected core files are moved to tmp mon cores in order to keep working directories clean warning Default is 0 critical Default is 1 any corefile results in a critical alert dir Lets you specify more paths to search for corefiles This option can be given multiple times delete Deletes corefiles not coming from merlind or monitor C op5 db 1 Scalable Monitoring 17 The mon command Distribution mon check distribution no perfdata Checks to make sure distribution works ok Note that it s not expected to work properly the first couple of minutes after a new machine has been brought online or taken offline Exectime mon check exectime host service warning min max avg critical lt min max avg gt Checks execution time of active checks host service Select host or service execution time warning Set the warning threshold for min max and average execution time in seconds critical Set the critical threshold for min max and average execution time in seconds Latency mon check latency host service warning lt min max avg gt critical lt min max avg gt Checks lat
34. gt self a11 type peer poller master command Execute command on the remote node s named all means run it on all configured nodes as does making the first argument type lt types gt means to run the command on all configured nodes of the given type s 20 1 Scalable Monitoring C op5 The mon command oconf The first not understood argument marks the start of the command but always using double dashes 1s recommended Use single quotes to execute commands with shell variables output redirection or scriptlets like so mon node ctrl for x in 12 3 do echo x done gt tmp foo mon node ctrl cat tmp foo List mon node list type poller peer master Lists all nodes of the optionally specified type Remove mon node remove namel name2 nameN Removes one or more nodes from the merlin configuration Show mon node show type poller peer master Display all variables for all nodes or for one node in a fashion suitable for being used as eval mon node show nodename from shell scripts and scriptlets Status mon node status Show status of all nodes configured in the running Merlin daemon Red text points to problem areas such as high latency or the node being inactive not handling any checks or not sending regular enough program status updates Changed mon oconf changed Print last modification time of all object configuration files Fet
35. instance widgets widget register widget load my widget function var my widget this t my widget widget id my_ widget setting change function my widget save custom val this val my widget setting do something n n That is you can safely search for the class within the widget instance id C op5 About GUI themes This chapter covers the following topics GUI themes Subject Page Subsections Introduction 110 The files and folders 111 Make your own theme 113 Before you start on page 113 Creating your own theme on page 113 Changing what theme op5 Monitor use on page 113 Making changes in the user interface 114 Changing the logo on page 114 Adding hostname to the Quick bar on page 114 Change the default font on page 115 109 110 1 GUI themes C op5 Introduction Introduction All views in the op5 Monitor user interface are built up with help of theme templates In the default op5 Monitor installation there is only one them default If you like to change any of the parts of the op5 Monitor user interface the best way to do that is to create your own theme That makes sure you do not lose any changes in an upgrade later on Of course you have to update your theme by your self to be able to enjoy many of the new features that comes with op5 Monitor updates In this chapter we will take a closer look of ho
36. no issues left start the monitor service 1 Third party configuration import Import configuration mon start C op5
37. notify notify dial pl CONTACTPAGERS 4 Click Apply 5 Click Save 150 1 Notifications C op5 Dial up notification Configuring the contacts To configure the contacts 1 Login to the op5 Monitor user interface and go to Configure 2 Eitheropen up an existing contact and create a new one 3 Onthe contact set Pager to a phone number on the form like this without the leading sign 46705123123 4 Sethost notification commands and service notification commands to notify by dial 5 Click Apply 6 Click Save Note Make sure the contact is a member of the contact group is associated with the correct objects C op5 1 Notifications 151 SNMP trap notifications SNMP trap notifications op5 Monitor is shipped with the possibility to send notifications as SNMP traps To start use the SNMP notifications you need to e adda few new commands e configure the contacts Adding SNMP notification commands Here we need to add two commands one for host notifications and one for service notifications To add a SNMP notification command 1 Login to the op5 Monitor user interface and go to Configure 2 Click Commands 3 Add the following new commands with the following settings command name nost notify by snmp command line SUSER3 notify notify by snmp pl H snmp trap host C SNMPCOMMUNITY t nHostNotify NOTIFICATIONTYPE SNOTIFICATIONTYPES NOTIFICATIONNUMBER NOTIFICATIONNUMBERS HOSTACKAUTHOR SHOSTACKAUT
38. paths and options are detected during configure Own adjustments should be made in opt monitor etc pnp config local php If this file does not exist the file config php can be taken as a guideline To access the PNP web front end through the GUI click on Graphs in the menu sa Graphs 128 1 Graph templates C op5 Collections Collections About Collections Collections provides the opportunity to collect graphs of different hosts and services on to one page That way as an example you can display the traffic rates of all tape libraries Creating a new collection The setup of Graph Collections is done through the configuration page Go to Configure and click on the Graph Collections icon Graph Collections There are two ways to select which services to show in the graph either use the GUI to select the services from the list or use regular expressions GUI selection Enter a collection name and select wich services to put in the collection by selecting them from the list Regex selection Check the checkbox for Use regex ig Use regex Use regular expressions The host and services is now selected by a regular expression In the example below we select all graphs from the host which names starts with switch and services that contains Interface and Traffic Note that regular expressions are case sensitive C op5 1 Graph templates 129 Switch traffic Lj Use regex
39. running op5 Monitor gt 5 2 is installed and running on both machines opened up the following TCP ports for communication between the servers 15551 op5 Monitor back end communication port 22 ssh for the configuration sync 1 Scalable Monitoring C op5 Distributed Monitoring both included servers are to be found in dns e Make sure the host group the one the poller will be responsible for is added to the master configuration and that at least one host is added to that host group The configuration Setting up the new distributed monitoring solution This distributed configuration will have one master and one poller master01 poller01 The poller will be monitoring the host group gbg During the setup we will use the command mon The mon command is used to make life a bit easier when it comes to setting up a load balanced solution To get more detailed information about the command mon just execute like this mon help To setup a distributed monitoring solution with one poller 1 Login to the master over ssh as root 2 Addthe new poller to the configuration with the following command mon node add poller01 type poller hostgroup gbg 3 Create and add ssh keys to and from the second peer by as root user mon sshkey push all mon sshkey fetch all 4 Add master01 as master at poller01 mon node ctrl type poller mon node add master01 type master 5 Set up the configuration sync
40. s etc In Configure you can e add new objects e modify existing objects e remove existing objects A lot of objects can be cross referenced in the configuration and Configure helps you with this to In most of the listings you will find a small text field called Filter by regular expression Use this to filter out the content you are interested in when viewing the different lists Required directives Hosts All objects have a list of directives that are required when adding a new object The other directives can be left out They will then get the op5 Monitor defaults value This does not mean you have to set every directive for every object One solution is called templates They make it a lot easier to manage a large set of objects Read more about templates in Using templates on page 45 Hosts are one of the central objects in the monitoring logic Important attributes of hosts are as follows Hosts are usually physical or virtual devices on your network servers workstations routers switches printers etc but it could be practically anything you can reach and monitor from the op5 Monitor server Hosts have an address of some kind IP address or host name 26 1 op5 Monitor configuration tool Main objects C op5 Hosts does not need a service directly associated to them the services can be inherited from a hostgroup A host can also exist without services Hosts can have parent child relationships
41. sent is defined in either one of the two files below e checkcomands cfg misccommands cfg The commands are divided into host notification commands 144 1 Notifications C op5 How does notifications works e service notification commands The notification commands are then using scripts in the same way as the normal check commands does All default scripts shipped with op5 Monitor is located in opt monitor op5 notify Notification macros Many ofthe arguments sent to the notification commands are macros The macros are a sort of variables containing a in most cases program wide value You can read more about macros in the Nagios manual http hagios sourceforge net docs 3 O macros html One of the most important macro used with notifications is SNOTIFICATIONTYPES This macro tells you what type of notification that is supposed to be sent The NOTIFICATIONTYPES macro can have one of the following values Table2 Notification types Notification type Description PROBLEM A service or host has just entered or is still in a problem state RECOVERY A service or host has recovered from a problem state ACKNOWLEDGEMENT A service or host in a problem state has been acknowledged by a user FLAPPINGSTART The host or service has entered a flapping state FLAPPINGSTOP The host or service has left a flapping state FLAPPINGDISABLED The host or service flapping detection has
42. server Microsoft windows users may use PuTTY for terminal access via SSH O and WinSCP for file transfers via SFTP SSH Macintosh or UNIX Linux users may use the commands ssh or scp from a local terminal window C op5 1 Plugins 83 The plugin interface The plugin interface Example 1 A plugin is a small executable that takes optional command line parameters as input and 1 Performs a test 2 Reports a diagnostic message on stdout will be shown in the web gui 3 Returns an exit code Execute check tcp to test the port 80 tcp on 193 201 96 136 monitor root opt plugins check tcp H 193 201 96 136 p 80 TCP OK 0 043 second response time on port 80 time 0 0428248 0 000000 0 000000 0 000000 10 000000 monitor root echo 0 monitor root opt plugins check tcp H 193 201 96 136 p 143 Connection refused monitor root echo 2 monitor root In the Example 1 on page 83 we first execute check tcp to test that port 80 tcp on 193 201 96 136 responds which it does hence the exit code of 0 Then we check port 143 tcp on the same host and that port is not open hence the result is Critical exit code 2 The result output is actually built upon two parts divided by a sign pipe The text on the e left hand side of the is the status information e right hand side of the is the performance data The performance data is not mandatory but you need it if you want Q your plugin
43. sms htmlpost dial up notification works snmp trap notification works C op5 1 Notifications 143 How does notifications works How does notifications works Inthe op5 Monitor user manual we describe some ofthe basics with notifications Let us take a closer look at how it really works Notification filters When a notification is about to be sent it has to go through a number of filters before op5 Monitor can determine whether a notification really is suppose to be sent or not Tablel Notification filters Filter Description Program wide This tells op5 Monitor if notifications are turned on or not in a program wide basis Service and host filters e Is the host or service in scheduled downtime or not Is the host or service in a flapping state Does the host or service notification options says that this type of notification is supposed to be sent Are we in the right time period for notifications at the moment Have we already sent a notification about this alert Has the host or service remained in the same non OK state that it was when the last notification went out Contact filters Does the contacts notifications options says that this type of notification is supposed to be sent Are we in the right time period for notifications at the moment according to the notification time period set on the contact Notification commands How the notifications are
44. storage path specified in etc op5backup conf exists to make sure that opSbackup sh is configured properly for local operation To create a more complex plugin 1 Create the script and editing it cd opt plugins custom touch check op5backup chmod 755 check op5backup Open up the script with your favorite text editor and type in the following code bin bash Create a function to print the storage path storagepath grep storagepath etc op5backup conf tail 1 sed g g sed s g Put the storage path in an environmental variable STORAGEPATH storagepath Test if the storagepath exists and is a directory if d SSTORAGEPATH then Print a warning message for the web gui echo op5backup sh is not properly configured for local operation Exit with status Warning exit code 1 exit 1 fi 4 If the script reaches this point then the test passed Print an OK message echo SSTORAGEPATH exists Exit with status OK exit 0 Add a check command like this using the op5 Monitor web gui command name check op5backup command line USER1 custom check op5backup Enter the service configuration for your monitor server and add a service with check op5backup as the check command Save configuration C op5 1 Plugins 89 More information More information This chapter has only scratched on the surface of how to write your own plugins To read more about plugin devel
45. tnit De t bes 131 Business Process ADOUL 322d E dec ctczcatc tct m Et eee ente et ad Sa conten satan ETT d a 133 Moldele lile dto a m LEER 134 BUSINESS Group coc A 135 About business groups eere D thi tt ere nous sostesesinratbversdean deena 135 Creating a new GROW Pech esc afe drole eeu ttd perdet tine et tate tea cible eee tesicbe tino 135 Creating a sub element ei eene et ee esc eR Eee R tances 136 PRUNES Ypes oeil tecti Pete he e ti dug acsi ursa edeu fossi desse uds 136 ecrire 137 Best state sss iure detudinn atit outfit ore e EE sata mate eae ate 137 Simple At I amp ast 5 dioe ed etnia tat eti edt quat 137 PC AST assoc ces ete ku cL m M C Ubi Eu 138 AUImOSLU oh teu a bi totasdet attt falsos DA Mod ob tained in Lund 138 ico 139 Gustom rules nn neat d e Ee tide Tele dus 139 Notifications About notlfICatlons 2 tert eee ET 141 INTRODUCTION P E 142 How does notifications works eseeseeseeseeeneeeneenenen nennen nnn 143 Notification filters 5 rte te Tet ER RE ee tl her Ds 143 Notification commands eeeeeeesessssssssssesseeeee neret 143 Notification MACOS idee tear tte erbe te Fette se pul oe docu etus 144 Notification e mail sender ssesssssssseseeeseeeeeeneennrennenennnn 145 Notification SKINS 5 i 20 csescecssceceeescerseizceedesvedsndvscvestsderssdestetederisettseiucsuinctss 146 The content of a notification skin
46. work in the op5 Monitor environment C op5 1 op5 Monitor configuration tool 41 Groups Groups The groups in op5 Monitor is used to group objects of the same type There are three types of groups in op5 Monitor e host groups Service groups contact groups They are all good to use to get things a bit more organized and they have also special functions op5 Monitor The following subsections will give you a brief description about how they can be used You may not have any empty groups in op5 Monitor so when you create a new group no matter what type it is you should have at least one object to add to the group Host groups Host groups can be used group hosts together in any way you like e A host can be connected to any number of hosts A host group can be connected to an other host group There are a few host groups included in the initial setup of op5 Monitor but you can create your own matching your own needs There are a infinite ways of using host groups and here are a couple of examples Grouping hosts by geographic placements e what company they belongs to whoowns the hosts e who should be able to see the hosts in the group function or operating system The list can be long Services on Host groups A host group can contain service checks These service checks will be inherited on all hosts connected to the host group A service on a host group work in the same way as a service f
47. 1 3 Restart monitor on the poller mon node ctrl poller02 mon restart 4 Remove the poller from the master configuration mon node remove poller01 5 Restart monitor on the master mon restart Master takeover If a poller goes down the default configuration is for the master to take over all the checks from the poller For this to work all hosts monitored from the poller most also be monitorable from the master If the master server not should take over the checks from the poller this can be set in the merlin configuration file To stop the master from taking over edit the file opt monitor op5 merlin merlin conf Add the following to the poller that you want the master not to take over takeover no Note that this is done per poller C op5 1 Scalable Monitoring Distributed Monitoring File synchronization To synchronize files from the master server to the poller add a sync paragraph in the file opt monitor op5 merlin merlin conf In the example below we will synchronize the htpasswd users file to the poller poller01 poller pollero1 address lt ip gt port lt port gt contact_group lt contactgroup gt sync opt monitor etc htpasswd users opt monitor etc htpasswd users Note that this is done per poller One way connections Recovery If one peer is behind some kind of firewall or is on a NAT adress it might not be possilbe for the master server to connect to the peer
48. 200 advert int 1 virtual ipaddress 192 168 1 3 dev ethO On the secondary master vrrp instance VI 1 State BACKUP interface etho virtual router id 51 priority 100 24 1 Scalable Monitoring VRRP advert int 1 virtual ipaddress 192 168 1 3 dev ethO Activate VRRP To activate vrrp run the following command chkconfig keepalived on C op5 C op5 1 Scalable Monitoring 25 26 1 Scalable Monitoring C op5 C op5 op5 Monitor API and CLI About op5 Monitor API This chapter covers the following topics Subject Page Subsections Introduction 28 GUI API 29 Configure API 30 To exectue the op5 Monitor CLI on page 31 27 28 1 op5 Monitor API and CLI C op5 Introduction Introduction op5 Monitor comes with a few APIs that can be used to The following APIs can be used Ninja API GUI API Nacoma API Configure API op 5 Monitor Configuration CLI C op5 1 op5 Monitor API and CLI 29 GUI API GUI API The GUI API is use to get the information that is used by op5 Monitor GUI It can give you information about all objects used by the op5 monitor Widgets are one place where the GUI API will come handy There are only a breifly documentation about that API today It is included in the product Let us say that your monitor server is called op5 monitor you can reach the documentation on the following location
49. A good way to use this feature is to have 1 e a Windows host group and then a MSSQL host group When adding the Windows host group as a member to the MSSQL host group the hosts added to MSSQL will get both the service checks that are standard for all Windows host and the default MSSQL service checks Service groups The service groups are used to group services together in the same way as for host groups On the other hand there 1s almost no useful at all to for example group service groups by geographic placements One good way to use service groups is to create groups containing services needed for a service you deliver to your customers C op5 Example 1 1 op5 Monitor configuration tool 43 Groups An email service group Let us take a simplified email service and show how the service groups can be used To be able to deliver an email service to our customers the following services need to be working DNS e SMTP e IMAP POP3 e WAN Connection File Storage We take al those services and place them in a service group called Customer email If we get a problem with any of the services in the Customer email group we can easily see that the whole email service has got a problem The service group in the example above is perfect to use in Service Level Agreement reports SLA in the op5 Monitor user manual to make sure we deliver the service as we promised Contact groups Contact groups are mainly used to setup
50. DOUTUSET Tells estie bt obe art a ulus arp ste aee nee ius 117 Custimize user menus eeeeeeeeese eese eee nnnm nnn nennen nent nnn nnns nsns nnnnn nana 118 Localization About Localization uite ttr tt ee E een etaed eae e det denda 119 Contents Introductio e 120 Downloading and starting the tools eene 121 Adding a new language ieosisetc coca dk aen idi anra c F Xl quOA as Ee Ce cEERa aug ACE EE ERR E 122 Changing basic language file settings sseessseeeeeees 123 Applying the new language to the server ssseeeeeeeee 124 Graph templates About graph templates isneus mme 125 IMTROCGUCTION m 126 Graph web front end 1i rii encre uo coetus eno inge rane anro orna aa uRk a 127 Collections eC 128 About Collections sssssss Hee 128 Creating a new collection scene enne nennen nnne 128 GUI Sselectlom rede Let e La ee e t esae oe ev een eee 128 Regex Selection aec i TA ye Ion A Ln Re IRURE eue RI RE nue Deu 128 Viewing CONS CONS stems Oasis teats cas Por tec uda 129 Combined Graphs cii cris ece see ara o LE nere ege rhon Ro ER n EE EN RYE aieiai 130 What is a combined graph rte eret ere Ride t aot e eto eto dis 130 Creating combined graplis sco cote qai aaecotactateet erit ERR Mie o gU t ene 130 Viewing combined graplis erronee
51. HORS HOSTACKCOMMENT HOSTACKCOMMENTS HOSTNAME HOSTNAMES HOSTSTATEID S HOSTSTATEIDS HOSTSTATETYPE SHOSTSTATETYPES HOSTATTEMPT SHOSTATTEMPTS HOSTDURAT IONSEC HOSTDURATIONSECS HOSTGROUPNAME HOSTGROUPNAMES LASTHOSTCHECK LASTHOSTCHECK LASTHOSTSTATECHANGE LASTHOSTSTATECHANGES HOSTOUTPUT HOSTOUTPUTS command name service notify by snmp command line SUSER3 notify notify by snmp pl H snmp trap host C SNMPCOMMUNITY t nSvcNotify NOTIFICATIONTYPE SNOTIFICATIONTYPES NOTIFICATIONNUMBER SNOTIFICATIONNUMBERS SERVICEACKAUTHOR S SERVICEACKAUTHORS SERVICEACKCOMMENT SERVICEACKCOMMENT HOSTNAME SHOSTNAMES HOSTSTATEID SHOSTSTATEIDS SERVICEDESCRIPTION SERVICEDESCRIPTIONS SERVICESTATEID S SERVICESTATEIDS SERVICEATTEMPT SSERVICEATTEMPTS 152 1 Notifications SNMP trap notifications C op5 SERVICEDURATIONSEC SERVICEDURATIONSECS SERVICEGROUPNAME SERVICEGROUPNAMES LASTSERVICECHECK SLASTSERVICECHECKS LASTSERVICESTATECHANGE SLASTSERVICESTATECHANGES SERVICEOUTPUT SERVICEOUTPUTS Change the following to their correct value in both commands snmp trap host SNMPCOMMUNITY Click Apply Click Save Configuring the contacts To configure the contacts 1 2 3 4 5 6 Login to the op5 Monitor user interface and go to Configure Either open up an existing contact och create a new one Set host_notification_commands to host notify by snmp Set service notification
52. Lj Page name Ld Host name Service r description Viewing Collections amp Use regular expressions Switch traffic switch Interface T raffic Collections The collections are found under graphs in the main menu on the left and click on the Collection icon qm Note that his icon is only visbile when at least one collection is created All the collections are listed in the panel to the right Pages Gothenburg LAN Robot network usage A Switch traffic IWAN Ping 130 1 Graph templates C op5 Combined Graphs Combined Graphs What is a combined graph A combined graph overlays several graphs in the same graph which will give a better overview of how two different checks are performing It takes one or more serives from one or more host and layes them on top of each other in the same graph The service checks must have the same name on all the hosts for Q combined graphs to work Creating combined graphs The combined graphs is greated though the configuration Go to Configure in the menu Configure Click on Combined Graphs Combined Graphs Enter a name of the combined graph and click on Add Name of Combined Graph CPU Usage Add C op5 Viewing combined graphs 1 Graph templates 131 Combined Graphs Select the service to graph and from which hosts this service should be fetched from Also add a name and comment Combined Graphs Creating
53. NT Syslog The op5 SyslogAgent is licenced as GPL software Installation The op5 SyslogAgent installation package consists of an msi installer To install simply double click the installation msi file and follow the on screen instructions By default the op5 SyslogAgent will be installed in an op5 subdirectory to the program files folder Usually C Program Files op5 SyslogAgent You will also have the possibility to choose if you want to create start menu desktop and quick launch shortcuts to the SyslogAgent configuration tool After the installation is completed you will be asked if you want to start SyslogAgentConfig If you don t do this the agent won t be configured and cannot be started If you choose to start the SyslogAgent configuration continue to the section Upgrading If a prior version of the SyslogAgent is installed it should to avoid problems be stopped and uninstalled as a service and then uninstalled Stopping and uninstalling the service can be done from the SyslogAgent Configuration tool Follow these steps to stop and uninstall the SyslogAgent service C op5 1 Agents 15 Windows SyslogAgent 1 Start the SyslogA gent Configuration tool 2 Press the Stop button see Fig 3 in the section Configuration 3 Press the Uninstall button After the service have been stopped and uninstalled you should uninstall the previous version of the SyslogAgent from Add Remove software on the windows c
54. OO In this case we do not use the escalation for unreachable or recovery which means that unreachable and recovery notifications will be sent to the contact group set on the host Click Apply changes Choose Add new host escalation Add new hostescalation Go Click Go Add the escalation number two a Choose the contact group that shall have the notification contact groups availiable Selected Set the start number in the escalation chain Q first notification 2 Set the end number in the escalation chain Q ast notification 2 Set the notification interval which is the number of minutes to wait to the next notification Q notification interval d 7 Choose the time period when this escalation will be in use Q escalation period f EB 1 We have set the first notification and the last notification to 2 because this escala tion will only be used once 2 The escalation interval is set to 0 because there will be no more escalations when this one is done 66 1 op5 Monitor configuration tool C op5 Managing objects f Choose what states this escalation will be valid for escalation options M Down C Unreachable C Recovery In this case we do not use the escalation for unreachable or recovery which means that unreachable and recovery notifications will be sent to the contact group set on the host 9 Click Apply changes 10 Click Save Modifying a host escalation To modify a h
55. TATEIDS HOSTSTATETYPE SHOSTSTATETYPES HOSTATTEMPT SHOSTATTEMPTS HOSTLATENCY SHOSTLATENCYS HOSTEXECUTIONTIME SHOSTEXECUTIONTIMES HOSTDURATION SHOSTDURATIONS HOSTDURATIONSEC SHOSTDURATIONSECS HOSTDOWNTIME SHOSTDOWNTIMES HOSTPERCENTCHANGE SHOSTPERCENTCHANGES HOSTGROUPNAME SHOSTGROUPNAMES HOSTGROUPALIAS SHOSTGROUPALIASS LASTHOSTCHECK SLASTHOSTCHECKS LASTHOSTSTATECHANGE LASTHOSTSTATECHANGES LASTHOSTUP SLASTHOSTUPS LASTHOSTDOWN SLASTHOSTDOWNS LASTHOSTUNREACHABLE LASTHOSTUNREACHABLES HOSTOUTPUT SHOSTOUTPUTS HOSTPERFDATA SHOSTPERFDATAS HOSTACKAUTHOR SHOSTACKAUTHORS HOSTACKCOMMENT SHOSTACKCOMMENTS NOTIFICATIONNUMBER SNOTIFICATIONNUMBERS CONTACTALIAS SCONTACTALIASS DATETIME SDATETIMES SHORTDATETIME SSHORTDATETIMES DATE SDATES TIME STIMES TIMET STIMETS HOSTACTIONURL SHOSTACTIONURLS HOSTNOTESURL SHOSTNOTESURLS ADMINPAGER SADMINPAGERS ADMINEMAIL ADMINEMAILS NOTIFICATIONCOMMENT S NOTIFICATIONCOMMENTS This has to be done for the command service notify as well 146 1 Notifications Notification skins C op5 Notification skins The three basic notifications email sms and htmlpost notifications are all using something called notification skins The notification skins are templates describing how the notification is supposed to look like when it is sent to its receiver If we will take a look at the notify folder we will find the following skins folders Skins
56. VICEEXECUTIONTIME seconds to complete Additional links requires configuration Host actions HOSTACTIONURL Host notes HOSTNOTESURL Service actions SERVICEACTIONURL Service notes SERVICENOTESURL The mail notifications can contain a lot more data and there we add a lot more to the mail skin file In both Example 1 on page 146 and Example 2 on page 146 you find text like s SERVICEDESC s HOSTNAME That text is called keywords The keywords will be replaced with the value of a command line argument looking like this FOO BAR So a command line argument like the one above will generate a keyword with the name Foo having the value BAR Note If a notification macro or other value sent to a corresponding keyword is missing in the notification command it will not stop the notification from being sent It is only the replacement that will be missing Creating custom notification skins Sometimes the default notification skins needs to be changed This shall not be done in the default folders To create custom notification skins 1 Go to the notify folder cd opt monitor op5 notify 2 Create the custom skins folder mkdir custom skins 148 1 Notifications C op5 Notification skins 3 Copy the skins folders to the custom skins folder cp skins custom skins 4 Make the changes you like to do and the new skins will be used at directly after you have saved the changes ops 1 Notificatio
57. When you are finished click Continue to step 3 8 Click Save Modifying a host To modify a host 1 On the start page choose the host you like to modify in the drop down list im Edi Host Filer by regular expression Clear backup gbg Go 2 Click Go In the view you will get only directives differ from the template will be shown To change the other directives click Advanced Advanced Make your modifications and click Apply changes 5 Click Save 1 Only hosts that aren t previously configured will be listed C op5 1 op5 Monitor configuration tool 53 Managing objects Deleting a host To modify a host 1 Onthe start page choose the host you like to delete in the drop down list im Edi Host Filter by regular expression Clear backup gbg Go 2 Click Go 3 Click Delete Delete A Click Delete all affected objects 5 Click Save Renaming a host When renaming a host in the web GUI it will only rename the host and will not rename the host name To rename the host name in log files as well a script has to be run manually The script will rename the host in log files If this is not done the host will lose all it s alert history To run the script logon to the op5 monitor via SSH as root user and execute the following command mon stop opt monitor op5 merlin rename rename all mon start If there is a lot of history this script can take a while to execute and during this time the op5 monitor servi
58. arguments in which case the arguments have to be in the correct order for the command s syntactic template The above example would then look thus mon ecmd submit add svc comment foo PING 1 John Doe the comment Fetch mon log fetch incremental lt timestamp gt Fetches logfiles from remote nodes and stashes them in a local path making them available for the sortmerge command Import mon log import fetch This commands run the external log import helper C op5 Node 1 Scalable Monitoring 19 The mon command If fetch is specified logs are first fetched from remote systems and sorted using the merge sort algorithm provided by the sortmerge command Purge mon log purge Remove log files that are no longer in use Currently only deletes stale RRD files Push mon log push documentation missing Show mon log show Runs the showlog helper program Arguments passed to this command will get sent to the showlog helper For further help about the show category use mon log show help Sortmerge mon log sortmerge since lt timestamp gt Runs a mergesort algorithm on logfiles from multiple systems to create a single unified logfile suitable for importing into the reports database Add mon node add lt name gt type peer poller master varl value varN value Adds a node with the designated type and variables Ctrl mon node ctrl lt namel gt lt name2
59. asources like the built in widget Unacknowledged service problems that is described in op5 Monitor User Manual To add this functionality insert the following in the top of your widget class protected duplicatable true Adding the widget to the widget table Be fore we can see the widget on the tactical overview we need to add it to the widgets table in mysql To add the widget to the database Run the following command from your shell C op5 1 Widgets 97 Writing a simple widget php opt monitor op5 ninja index php cli save widget name hello world friendly name Hello World page tac index Removing a widget If you for some reason should want to delete a added widget completley you can remove it by deleting it from the mysql database mysql uroot merlin gt DELETE FROM ninja widgets WHERE NAME hello world quit Viewing the widget If everything is done correctly we will now be able to view are first simple op5 Monitor widget To view the widget Open up the Tactical overview in the op5 Monitor user interface and it will look like this Hello World nix Hello World 98 1 Widgets C op5 Take your widget a step further Take your widget a step further The example we have been working on here in this chapter is very basic and the output is not much to use Once you have understood the basics you will probably like to create a more useful widget One way to get more inform
60. ation Changes sseeee m 24 UENIR Ol ol oi c r rm 25 Required directives sssssssssssseee eene 25 ii Contents Hosts cst e ides earn he HAV Hard divin ex aces feci et el os 25 Required directives sss enne 26 SGIVIGOS ice Pub ure ARR EU REX AREE E Verba auch EPOR Vx E eni alt 27 Required directives cccccccceccccceeeeeeeeeeeeeeeeeaaeeeceeeeeeeeeeeesesssaasanaeeeeeeeeeneenes 27 Contacts 45 5 3 t o Heathens eb D RO De E 29 Required directives cccccccccccccceeeeeeeeeeeeceeneaaeeeceeeeeeeeeeeesesceecunaeeeeeeeeeteenes 29 Access rIghls ott ee aaien ienee AK kd tx a lea bere Saai 31 Required directives sssssssssssssssssseseeeenene ener 31 Access rights iri detail 2 ertet ioo rbd trie ehem re He pd Beta 31 Recommended settings eese nennen tentent nnne denne 32 Admin soles vede ce hae oen oerte Ree re T ccs e Pr s esee et epe c Rene ade 32 Admin Role Example sssssssssssesseseeeneenee eem emere nnne enne 34 TIME POM OOS eR acseestenteaeaet 37 A time period in detail cccccccceeceeeeeeceeecceece eee eeeeeeetegceceaaeaeeeeeeeeeeeeeeeeenenes 38 Commands 5 eek teer ee rere tte cuc deere ces EAEE EEA EE 40 DIIRE A oi ottico erecti his seta LIE ELEME 40 AET NA A LET E 40 Groups uhren aere eee dete eel ene bande dera Sie Rian deve ceeded amen cu R 41 HOST f o ro vjer te CERE 41 Se
61. ation about how you can create a more advanced widget is to take a look at one of the widgets shipped with op5 Monitor The Network health widget is a good example That one can be found here opt monitor op5 ninja application widgets netw health If you are changing any of the default widgets remember to create a copy of the widget with a new name and place it in opt monitor op5 ninja application custom widgets C op5 1 Widgets 99 Packaging your widget Packaging your widget To make it easy for other users to install and start using your widget you should make a package of it Then one can install the package in the Tactical Overview in the op5 Monitor GUI The package is actually a normal zip file that contains e the widget in it self manifest xml The manifest xml file contains basic data needed by op5 Monitor so that it knows how to install the widget Creating the Manifest xml To create a Manifest xml file 1 Create an xml file that looks like this lt xml version 1 0 encoding UTF 8 gt lt Manifest file for widget to be used in Ninja4Nagios gt widget content author John Doe lt author gt lt version gt 1 0 lt version gt Friendly name gt My cool widget lt Friendly name gt description A cool widget for op5 Monitor Tactical Overeview description lt page gt tac index lt page gt lt widget_content gt 2 Place itin the folder where your widget is located a
62. ce or a host should be monitored or when you are creating availability reports C op5 1 op5 Monitor configuration tool Macros Macros Macros can be used to a lot of things It can for example be used for paths passwords and retrieving information from op5 monitor You can read more about notification commands in Notification macros on page 144 in the Notifications chapter Pre defined macros By default op5 monitor has a number pre defined macros All from path to plugin folder to retrieving information about the last state of service check Below is a list of some macros a complete lite of macros can be found at nagios home page http nagios sourceforge net docs 3_0 macrolist html MACRO DESCRIPTION S USERI Path to opt plugins ARGn The nth argument passed to the command HOSTNAME Short name for the host HOSTADDRESSS Address of the host SHOSTSTATES A string indicating the current state of the host UP DOWN or UNREACHABLE SSERVICEDISPLA An alternate display name for the service YNAMES SSERVICESTATES A string indicating the current state of the service OK WARNING UNKNOWN or CRITICAL Custom macros It is possible to create your own macros This can be used to store passwords or user names for example All custom macros should be put in the file opt monitor etc resource cfg A custom macro should use the SUSERn macro To define a passwor
63. ce will not be running Note that this does not yet work on schedule downtime objects If a host is renamed that has a scheduled downtime the scheduled downtime will be lost Network autoscan It might get handy to let op5 Monitor scan and notify you if there are any new hosts on a particular network range The network autoscan function will e scan certain range for new hosts notify you when new are found e beexecuted every night by cron on the op5 Monitor server 54 1 op5 Monitor configuration tool C op5 Managing objects No host will be automatically added The network autoscan function O will only find the hosts for you Adding a new autoscan configuration You may add as many autoscan configuration as you wish When adding a your network range you may use the same syntax as when you manually scans a network from the Add new host wizard To add a new autoscan configuration 1 Click Configure in the main menu 2 Click Network Autoscan Network Autoscan 3 Fillin the New scan form New scan Name AppNet amp IPRange 192 168 1 0 255 The application server net a Description Active M Name The identifier of this autoscan configuration JP Range In this case a complete C net e Description e Activate Make this autoscan configuration active and in use 4 Click Save Adding a host to blacklist In certain ranges you are scanning with the network autoscan there might be hosts you do not wan
64. ceeeeeeeeeeceeeeeeeeeeeeees 164 Backing up the configuration eeeeeeeeeeeeeeeeneeeneenn nnn 165 Restoring a configuration backup eene 166 Upgrade About Upgrade c loses datio te e a odia disces us a agua estates 167 INTRODUCTION RE 168 Upgrading With yui aiicccesbscts su cewadssaiesbosctodstadinecbdnatedarsenanasiets buccnetianitaamsscueaninns 169 Upgrading with tar gz f165 0 uu ccternamnds ici cccesandunntnebsetcaeieaiuenacctuncornct 170 Scalable Monitoring About Scalable MOnIEOTIDIO iot oo Sont Euer eet tar Bo netde akan edo act ito tuaen 1 Distributed Monitoring 5 1o niente iran nu alin roa n daa sa CR EXXR on a EEE E SE ERAN R ERES 3 INMhOG UCONN EE 3 Before We SIalte uio eno utelidilettr esae terat esed Eres eire pes Dane tet dutie rte oett 3 EMG COMMQUAUO Misia PE 4 Setting up the new distributed monitoring solution eessesss 4 Adding a new Poler osaceae rS raa eA EES aR LE nnne sienten 5 Adding a new host group to a poller ssse m 5 Removing a pollet itr a ie eR ete 6 Master takeover sisii ei eiiean aaie eita adaa aaaea a aaide riai 6 File synchronization Aaaa iraa A AA TS A LART 7 One way connections ecien dai AEE A AASA ENET 7 Ipsos LEE 7 More informattion cccccccccccccsecceccceccceeceeccceccceccecceecceeeceesececensceeseeeeeeneseness 8 Load balanced monitoring ee
65. ch imon oconf fetch documentation missing Files mon oconf files Print the configuration files in alphabetical order Hash mon oconf hash Print shal hash of running configuration C op5 SSHKey 1 Scalable Monitoring 21 The mon command HGlist mon oconf hglist Print a sorted list of all configured hostgroups Nodesplit mon oconf nodesplit Same as split but use merlin s config to split config into configuration files suitable for poller consumption Pull mon oconf pull documentation missing Push mon oconf push Splits configuration based on merlin s peer and poller configuration and send object configuration to all peers and pollers restarting those that receive a configuration update ssh keys need to be set up for this to be usable without admin supervision This command uses nodesplit as its backend Spit mon oconf split lt outfile hostgroup1 hostgroup2 hostgroupN gt Write config for hostgroupl hostgroup2 and hostgroupN into outfile Fetch mon sshkey fetch Fetches all the SSH keys from peers and pollers Push mon sshkey push Pushes the local SSH keys to all peers and pollers 22 1 Scalable Monitoring C op5 The mon command Test All commands in this category can potentially overwrite configuration enable or disable monitoring and generate notifications Do NOT use these commands in a production environment Dist mon test dist options
66. check The load balanced solution havetwo or more peers sharing the same task the hosts to monitor e allows configuration at any of the peers make sure that all new config is distributed to the peers e uses the peers to dived the load automatically keep tracks of when one peer go down the other s take over the job Before we start There are a few things you need to take care of before you can start setting up an load balanced monitoring You need to make sure youhave at least two op5 Monitor servers of the same architecture up and running op5 Monitor gt 5 2 is installed and running on both machines 10 1 Scalable Monitoring C op5 Load balanced monitoring opened up the following TCP ports for communication between the servers 15551 Op5 Monitor back end communication port e 22 ssh for the configuration sync both included servers are to be found in dns or the host file etc hosts The configuration Setting up the load balanced solution This load balanced configuration will have two so called peers peer01 peer02 During the setup we will use the command mon The mon command is used to make life a bit easier when it comes to setting up a load balanced solution To get more detailed information about the command mon just execute like this mon help To setup a load balanced monitoring solution 1 Login to one of the systems over ssh as root 2 Addthe second peer to the conf
67. chosen date range you will here set the end date C op5 1 op5 Monitor configuration tool 39 Main objects Directive option Description Frequency Haw often the exception is repeated Valid values positive integers greater than one E g Daterange 2008 01 01 2008 12 31 5 means every fifth day of 2008 e Day range 1 monday march 3 sunday may 3 means every third day between the first monday and the third sunday every month e Date range 2008 06 01 14 means every 14th day from first of june 2008 Note that this exception has no end Hours Which time to include for this exception You can define multiple times by separating them with comma Example 00 00 01 00 03 00 06 00 The table below describes exception by Day Directive option Description Interval Choose Single day or a Day range Weekday Choose the weekday that is supposed to be used in this Exception From weekday If you chosen Day range you will here set the start day To weekday If you chosen Day range you will here set the end day Frequency How often the exception is repeated Valid values are positive integers greater than one E g Daterange 2008 01 01 2008 12 31 5 means every fifth day of 2008 e Day range 1 monday march 3 sunday may 3 means every third day between the first monday and the third sunday every month e Date range
68. command line be sure to modify the perl script as well debug will enable some debugging output to the System Console screen This is only really useful when you are first configuring the extension mla lt license gt For those with an MLA license mostly for NetWare 5 the MRTGEXT NLM currently can not obtain a valid value for the server license count Using this option will tell the MRTGEXT NLM the license count max to report This is important if you use the NWEXTCFG PL to create configuration files or if you use the servstat pl script For example if you have a NetWare 5 MLA license and you really only have a 100 user server then you would add m1a 100 to your load command line More information For more information please read here http download op5 com agents novell 1 46b readme txt 14 1 Agents C op5 Windows SyslogAgent Windows SyslogAgent op5 SyslogAgent runs as a service under e Windows 2000 e Windows XP e Windows 2003 e Windows 2008 It formats all types of Windows Eventlog entries into syslog format and sends them to a syslog host The op5 Monitor server or the op5 LogServer The agent can also forward plaintext log files Introduction The entries in the Event log are sent to the op5 Logserver or op5 Monitor server Text based application logs are also supported The op5 SyslogAgent is a repackaged version of the Datagram SyslogAgent which initially is a bug fixed version of Sabre Net s old
69. cssiecexcosursieves dues sven sieves ised iesvveies 68 die moe Tcr CEDE 68 Creating a Profile oce e etti eres ii ro aan el aie 68 Using a Profile inedite gie ee Dav dent e ATE 68 Cloning ODI OCS iiser ite oe eod Lone ato eae Rye otl ete 68 Cloning from an existing Host emen 68 Cloning Services iE derer RI UR EE Pr EORR be alee 69 Copy objects tS raan aa a e EAN ARA aE AAE 69 Propagate settings cerro nne po dr creta Ix ER RR ERAT A tesa sabe 70 Bulk delete 2 3 rn ec i i en pes 71 Time period iau 74 Add atime period ertet ertet ee rr e e reg Mes 74 MACOS SES 75 m Pre defined macros 75 Custom macros s n uta de e esp Lo tet tee Ses 75 Features not supported by Configure eeeeeeeeeneeeenn 77 Plugins About plugins aeos torso es deter ertet edat ioi be Det ad st seas tous rae uota 79 Introductlon eer eerie rrr rrr nen nan na eran iaa 80 Paths and macros iiie herren err rena Tea Dx x REF Rey eaa kdo aene sesaavcssbessvends 81 Before YOU Stari ueni adio ora aa ea a ax ud ade a E Ex LA aea ra oc RAD BRE CD cgk CA 82 The plugin interface ciao eai tennant een shee C ucke uiam do rx ax Ea SEE Rus e FR RR aug EOS 83 Status output i 2 Dorn E ER oe ied aah tgs iri E UE al ees eee ian 83 Performance data ceci kr e Pe RR e ER DR Y XE RT e E 84 nici ng 85 Adding your first plugin to op5 Monitor
70. ction by section Settings allowed_hosts C op5 Example 1 1 Agents op5 NSClient This option lists all servers that are allowed to talk to the agent Enter the IP address of the op5 Monitor Statistics server If this option is left blank anybody will be able to communicate with the agent log debug 0 Set debug to 1 to enable debugging This is normally not needed but can be very useful when debugging NSClient port 1248 This is the port used for NSClient style requests i e using the check nt plugin If any other application is already using the default port it might be necessary to change this option Note If a non default port is used you also need to make changes on the op5 Monitor server NRPE port 5666 This is the port used for nrpe style requests In order for a minimum of configuration on the op5 Monitor server it s recommended that this option is left with the default value If this is changed new nrpe check commands using the configured port need to be created on the op5 Monitor server allow arguments 0 Set this to 1 to enable the possibility to include arguments in nrpe requests This could be considered a security risk so only enable this if needed Also make sure to set the a11owed hosts option described above if arguments are allowed NRPE Handlers The nrpe handlers provide a way to execute any custom plugin check command on the monitored Windows server In this section yo
71. d for a check first add the macro in resource cfg Password for vmware user SUSER10 secretpasswOrd After that add the macro to check command in this example we use the check esx3 host cpu usage check command 76 1 op5 Monitor configuration tool C op5 Macros ck esx3 host cpu usage command name check esx3 host cpu usage command line SUSER1S check esx3 H SHOSTADDRESSS u SARG1S p SUSER10S I cy file id etc checkcommands cfg v st this command command name check esx3 host cpu usage command line USER1 check esx3 H SHOSTADDRESS u ARG1 p SUSER10 1 cpu s usage w SARG2 c SARG3 This check will use the following macros SHOSTADDRESSS Will get the address of the host from the configuration S ARGIS Use the fist argument from the check command USER10 Use the argument specified in resources cfg with the same name SARG2 Use the second argument from the check command ARG3 Use the third argument from the check command C op5 1 op5 Monitor configuration tool TT Features not supported by Configure Features not supported by Configure Even though some features are not supported by the op5 Monitor configuration tool you can still use them The hostgroup name is one of them What you have to do is to add a separate configuration file not read by the import function in Configure Then you add your other configuration tricks into that file To add a configuration file
72. des the name that must be unique These are the objects that 1s possible to make a copy of Hosts e Services Hostgroups e Servicegroups e Check commands e Contacts e Contactgroups Templates Timeperiods Host Dependencies e Service Dependencies Host Escalations e Service Escalations The copy will inherit all the values set on a object exept the name To illustrate this let us make a copy of a check command and modify it slightly 70 1 op5 Monitor configuration tool C op5 Make things easy 1 Click on Configure in the main menu 2 Select Commands in the configuration menu 3 Search for a command to copy Command command x esx3_host_vmfs Clear check_esx3_host_vmfs bal Go Related items Need help Ui Check Command Import Bulk delete objects check esx3 host vmfs Cony Delete check_esx3_host_vmfs ud command name Syntax help command line SUSER1S check esx3 H HOSTADDRESSS u ARG1 p ARG2 I vmfs s SARG3 w SARG4 c SARG5 E file id etc checkcommands cfg y Test this command 4 Click Copy 5 Make the changes you want A new name is required and i e create a listing of the attatched VMFS storages New command check_esx3_host_vmfs_list uJ command name Syntax help id command line SUSER1S check esx3 H HOSTADDRESSS u ARG1 p ARG2 I vmfs LJ file id etc checkcommands cfg Test this command Submit 6 Click Submit This approach should
73. e Additional information In a distributed enviorment a selectbox will appear when hovering over the menu item Scan host for network services where you can select from which op5 Monitor system that should preform the scan Related items 2 Scan host for network services i This server x Scan This server Scan host for Windows Services Scanning a host for snmp interfaces In many times when you are about to monitor a switch or a router you need to setup a lot of services It is hard work and takes a lot of time to add them one by one Instead of adding all interface services one by one you should use the scan for snmp interfaces function To add snmp interfaces 1 Open up the host in Configure you like to add new services on 2 Click Scan host for SNMP interfaces 3 Setthe SNMP community 4 Chose SNMP version 60 1 op5 Monitor configuration tool C op5 Managing objects 5 Click Scan host sth sw01 172 27 76 202 Interface Status Traffic Errors Select all Q D a Interface 1 D O Oo Interface 3 Oo 00 Interface 4 Interface 5 Oo Oo Interface 6 Interface 7 OQooooOQ o oo ooo Interface 8 Interface 25 OO oo oo Interface 26 Add selected services Select the services you like to add Click either the host or the service link to get back Click Add selected services Click Save O o Oo Scanning host for windows services There are two ways to scan
74. e sure you do not add any space between the comma Default empty nrpe_user The user the NRPE daemon is executed as Default nobody nrpe_group The group the NRPE daemon is executed as Default nobody debug Set to 1 if you need to debug the NRPE Default o command timeout The default time out in seconds a check shall have Default 60 dont blame nrpe Set to 1 to be able to send arguments to NRPE Default o Adding commands to NRPE NRPE comes with a few predefined commands Those commands are located in etc nrpe d op5 commands cfg You may add your own commands and you should do that in your own file in etc nrpe d AN You must set C G as extension to your configuration file or else it will not be loaded into NRPE when the daemon is restarted NRPE command definition The NRPE command definitions is divided into two parts 2o c im op5 Table 3 NRPE command parts Part Description command name The string between the square brackets will be the name of this command The name is used when you executes the command with check plugin A Do not use space in the command name opt plugins This is the command line used to execute the plugin you are going to use in your command To add a command to NRPE Here we will add a command that is looking for a process named smsd using the plugin check_procs which is install
75. ed by default 1 Login to the host you have installed NRPE on as root user over ssh 2 Create a new configuration file and open it up with your favorite editor 3 Adda command line looking like this command proc smsd opt plugins check procs w 1 c 2 2 C smsd 4 Savethe file and restart NRPE Service nrpe restart Plugins used with NRPE The only plugin used with NRPE is check nrpe To use the plugin with the command defined in Adding commands to NRPE on page 11 you shall use the following command line in your service definition opt plugins check nrpe H HOSTADDRESS C proc smsd C op5 1 Agents 13 Novell Novell MRTGEXT was originally written as an NLM for Novell Netware to obtain values used with the widely known MRTG predecessor of cacti which is the base of OP5 Statistics but it can also be used to poll values from op5 Monitor Installing Novell MRTGEXT To install this extension simply copy the MRTGEXT NLM to each NetWare server s SYS SYSTEM directory that you wish to gather statistics from Then edit the server s AUTOEXEC NCF to LOAD MRTGEXT so it will load each time the server is restarted The MRTGEXT NLM has three command line switches available port lt port gt will change the port that MRTGEXT listens on for statistic requests By default MRTGEXT will use port 9999 For example to have MRTGEXT use port 1023 add port 1023 to the load line If you change the port number on the
76. eeeeeeeeeeeeeeeeee nennen enne tnnt 9 INTO UCT ON E 9 Before we sltart is secca e e Re c Cea Hk n Rx RR DIR s 9 BH Tecla e 10 Contents vii Setting up the load balanced solution sseeeen 10 Adding a new peer cone tees e ee e oe m dela eee 10 Removing a peer npe eret b S e e e i gis 11 File syrichronizatiorn 2 11 edicit He De doc do t Led dete ded tn e e dad 11 More information sro a e a E A A R E 12 idi EE ET A T 13 ADO a scatates as 13 Merlin components sne a aaa aa e a a i nnne 13 merlinsmodgd odit ea ent Sal oh ath ed e uei 13 rrerlipd eu xS Ae DAD eMe nM E er 13 Merlin database 2 2 pce get oid m e ntt iei eMe iride aea 13 lll stEatlOng soon htt Ute inedite esiiasa Leite le 13 The mon command ni s aii rion riot Yn Lerner o nhe aa y ete xpo onmi iC EX Uo aaraa lanana naian 15 eere URP 15 THE COMMANAS scitote de td e o ad a t e eto o o y e Rd 15 Otartosziut odi mud mx ese MIS i 15 SOD TERES 15 PROS TAM m 15 cB EE 15 COCK dE 16 jp 17 ECMA cues acta A Tne i seated oan ee tUa uasa toa deuote seine te d eod aec Ee doin 18 Non 18 Node cottidie t 19 eomm em 20 SIX MIT cx 21 TOS i eet v reed ene Eu A eee ee 22 AA nda maa AAEE EEEE hernia nennen annee Ferner ea vies eudusdstensiventedssuvuedsventesensoases 23 ADOUE eee ER TER get D T eee AED Se ye ene a eee 23 S LE OPER AEEA Norra lav avai A Asiatic 23 Activate VRRP E 24 e E T E a E 25 op5 Monitor API and CLI Abo tops Mo
77. en you are done click on save C op5 About Localization This chapter covers the following topics Localization Subject Page Subsections Introduction 120 Downloading and 121 starting the tools Adding a new language 122 Changing basic language file settings on page 123 Applying the new language to the server on page 124 119 120 1 Localization C op5 Introduction Introduction In op5 Monitor we have the possibility to show all texts in your own language This so called localization is done with help from gettext which is a part of the Linux translation project There are many different ways to work with the gettext files You can use e the cli commands from the gettext installation e aprogram like poedit Here in this chapter we will use poedit to add a new language to op5 Monitor C op5 1 Localization 121 Downloading and starting the tools Downloading and starting the tools The first thing we need to do is to download the tools In this case just only the Poedit To download and starting the tools 1 Goto http www poedit net download ph 2 Download and install the version needed for you OS 3 Start poEdit and follow the instructions a Click OK Setup This is first time you run Poedit Please fill in your name and email address This information is used only in catalogs headers b Fill in your name and email address and click OK Editor
78. ency time of active checks host service Select host or service latency time warning Set the warning threshold for min max and average execution time in seconds critical Set the critical threshold for min max and average execution time in seconds Orphans mon check orphans Checks for checks that haven t been run in too long a time cahash Calculates a hash of all entries in the contact_access table This is really only useful for debugging purposes The check does not block execution of other scripts or checks 18 1 Scalable Monitoring C op5 The mon command ecmd Log Fixindexes Fixes indexes on merlin tables containing historical data Don t run this tool unless you re asked to by op5 support staff or told to do so by a message during an rpm or yum upgrade Search mon ecmd search lt regex gt Prints templates for all available commands matching lt regex gt The search is case insensitive Submit mon ecmd submit options command parameters Submits a command to the monitoring engine using the supplied values Available options pipe path lt path to nagios cmd gt Example An example command to add a new service comment for the service PING on the host foo would look something like this mon ecmd submit add_svc_comment service foo PING persistent 1 author John Doe comment the comment Note how services are written You can also use positional
79. ervice or a host should be monitored or when you are creating availability reports 1 op5 Monitor configuration tool C op5 A time period in detail The following tables describes the directives of a time period and how to use them The table below describes the first part of directives of a time period Directive option Description timeperiod name short name of the time period alias descriptive name of the time period Monday to Sunday which time to include for each day you can define multiple times by separating them with comma Example 00 00 01 00 03 00 06 00 Exception type Specify what type of exception you want to use Date or Day Depending on what kind of exception type you have chosen you will get different settings choices The two lists below describes them all The table below describes the exception part of a time period Directive option Description exclude Other predefined time period definitions that should be excluded from this time period Exception type Specify what type of exception you want to use Date or Day The table below describes exception by Date Directive option Description Interval Choose Single ate or Date range Date Choose the date that is supposed to be used in this Exception From date If you chosen date range you will here set the start date To date To date If you
80. es This chapter covers the following topics Graph templates Subject Page Subsections Introduction 126 Graph web front end on 127 page 127 Collections 128 About Collections on page 128 Creating a new collection on page 128 Viewing Collections on page 129 Combined Graphs 130 What is a combined graph on page 130 Creating combined graphs on page 130 Viewing combined graphs on page 131 125 126 1 Graph templates C op5 Introduction Introduction op5 Monitor is using PNP to create the graphs available for most standard services in the user interface PNP is an add on to nagios which analyzes performance data provided by plugins and stores them automatically into RRD databases Round Robin Databases PNP only processes performance data built according to the Developer Guidelines for nagios plugins With this limitation we want to honour the work of Nagios Plugin Developers who stick to the guidelines This is a short description of how to use PNP and it s functions pages and templates For more info please refer to the online manual for pnp http www pnp4nagios org pnp start Kudos to Joerg Linge for letting us use his text C op5 1 Graph templates 127 Graph web front end Graph web front end The behavior ofthe PNP Web Front end can be controlled through the config file opt monitor etc pnp config php This file will be overwritten during updates of PNP as the
81. esen eene entente rennen 99 Creating the widget package intei e bt ltr ee icc ooi caa 99 Access widgets externally eeeeeeeeeeeeeeeee eee een ennt nnne nnn 100 Server side setup roii Le eee b rhe d ve lo da ree ere Nerves 100 External website setup ssssssssssssse HH 100 Widget Porting guido orien inrer nn na nra uno nana nana ua e una eia 102 VAVASCKID c rhs a ar faethe Meader treats aaa 102 VOW 102 COMMON e Ae Siena E ict 103 Extra Setting S sientes boa Bree aceto tole deus eter t pte Sd 106 Multiple INStanCes eter e echt eere e ea dae Yn rt 107 GUI themes cotuciui gg mE 109 ypirere freirpor MES 110 The files and TOIdGIs uccisi ed Ert cibis dicas in hn Saas ede Lir Tad Ende eta 111 Make your own theme eeeeeeeseeeeeeeeeee eene nnn entren nans nennen nnn nnns 113 Belore VOL SUITE so tese Koh exe eade adeo Ded Pea E dla eut Renee hes 113 Creating your own themMe cccccceecseeercceeeeeeeeeseeeeneeeeeeeeesssenseeeeeneeeeeaes 113 Changing what theme op5 Monitor use ssssee 113 Making changes in the user interface eeeeeeeneneeeee 114 Changing the logo sssssssssssssssssessese eese tne RE 114 Adding hostname to the Quick bar ssssee 114 Change the default font 1 rette tette te ated 115 User menus A
82. est choice B address 10 10 10 10 5 We assume this is a Microsoft windows server and that NSClient has been installed Check for the following service checks Add UNIX Client Services NRPE Add Windows Client Services NSClient g Service JAdd Sensatronics E4 Checks JAdd Sensatronics EM1 JAdd NetWare Client Services NWStat JAdd WMI When using WMI a administrators account must be selected It is also O possible to create a user with less privileges see how to s on WWW Op5 com 6 Click host logo to set the icon that will be displayed for this host in lists and maps E Host logo A list looking like this will be displayed Click the icon you like to use 5 m Aes NM ma 7 Click Scan hosts for services Su uw Ub E Hi To add a new host using the new host wizard Part 2 1 Leave the initial settings as it is and scroll down to the services C op5 1 op5 Monitor configuration tool 51 Managing objects 2 The scan has found out that NSClient is installed plus two other services that can be added to this host Check Select All to add all services found or NSClient found in NSClient 0 3 7 493 2009 10 12 example host 172 27 86 97 An example host Select All NET Rd PING Nameserver NSCLIENT Q Disk usage C CPU Load a Uptime Ca Mem usage select the one you like to add for this host 3 Click Continue to step 3 4 Now either click the hos
83. heme op5 Monitor shall use 1 Goto the application folder cd opt monitor op5 ninja application config Open up config php in your favorite text editor 3 Lookup and change the following line and change the theme name from default to my theme in this case config current theme default 4 Saveandexit 114 1 GUI themes C op5 Making changes in the user interface Making changes in the user interface As you probably already have realized you can do almost any kind of changes in the op5 Monitor user interface Covering them all would require a complete manual of its own So in this chapter we will only take a look at a few of them Changing the logo e A Adding hostname to the Quick bar e Change the default font The topics listed above should give you knowledge to do other modifications by your own Changing the logo One thing you might want to do is to change the default logo up in the left corner of the user interface Before you starting To change the logo 1 Make sure you have followed the instructions in Make your own theme on page 113 2 Create your own logo file It shall meet the following criteria Width 19px Height 19px Type PNG 3 Replace the following file with your own opt monitor op5 ninja application views themes my theme icons icon png Adding hostname to the Quick bar If you have more then one op5 Monitor server it might be a bit difficult to remember which one yo
84. hitorAPL icit tee eren ere i er e a e 27 L eLtkole lite ito Lm 28 cIMP um 29 Configure APT iiec iiri Eod arena ro Fl saaien ES Oe Era DH ER RR KE iiiki aoaia RE FEE FUR IE 30 op5 Monitor Configuration CLI eese nnn 31 To exectue the op5 Monitor CLI sssssssssseeeeene 31 Wiki ADOUELUWIKI eite teet ior tea tan ae ach ea Potete aee ode ape ede ener cea bets 1 HOUGHTON Rc P 2 Managing wiki pages iioii iae eie ceo eed e iEY c Ub Paria iu Ee rra Ee pda Fara in EE ub sariin 3 Greate a WIKI page aea eu tried etel teta edente eoe en RAP RR M eni 3 Deleting a WIK Dage rco eei dte etie dort eR eR eset aosa 3 viil Contents Third party configuration import About Third party configuration import atten pes E Pre requirements Eitiiitatioris 4e ite tiores SERE deteriores tufed tae PssUrr terr aer ORE e Dod ses lmport CONTIQUIATION e ennnen Preparing nagios configuration Import nagios configuration C op5 Introduction About introduction This chapter covers the following topics Subject Page Subsections Using this manual 2 About op5 Monitor 3 1 Introduction C op5 Using this manual Using this manual This manual includes information about the more advanced parts op5 Monitor and its components The manual is written with the goal to give the reader help about how to manage the different parts of op5 Monitor This
85. htmlpost e Skins mail e skins sms Each folder contains a number of notification skins divided into host and service notification filters e host ACKNOWLEDGEMENT e host FLAPPINGSTART e host FLAPPINGSTOP e host PROBLEM e host RECOVERY e service ACKNOWLEDGEMENT service FLAPPINGSTART service FLAPPINGSTOP service PROBLEM service RECOVERY As you can see there is one skin for the most common notification types The content of a notification skin Example 1 Example 2 Let us take a look at what a skin looks like The sms service PROBLEM skin SERVICEDESC on HOSTNAME is SERVICESTATE SERVICEOUTPUT This is a very simple skin The reason for that is that you can not send too much data with a normal sms The mail service PROBLEM skin From op5Monitor To CONTACTEMAIL Subject op5 NOTIFICATIONTYPE SERVICEDESC on HOSTNAME is SERVICESTATE extra_host_vars op5 Monitor C op5 1 Notifications 147 Notification skins Service NOTIFICATIONTYPE detected SLASTSERVICESTATECHANGER SERVICEDESC on host HOSTNAME has passed the SERVICESTATE threshold STATUS URL Additional info SERVICEOUTPUT Host HOSTNAME Address HOSTADDRESS Alias HOSTALIAS Status H HOSTSTATE Comment NOTIFICATIONCOMMENT Service SERVICEDESC Status SERVICESTATE Latency Check was SERVICELATENCY seconds behind schedule Misc Check took SER
86. https op5 monitor monitor Documentation html index html It is generated by doxygen and contains information like namespaces Structures classes and methods files 30 1 op5 Monitor API and CLI C op5 Configure API Configure API The configure API is used to manipulate the object configuration used by op5 Monitor It works against the configure database the same way as the op5 Monitor Configuration tool does You may use it to build integrations between op5 Monitor and other third party software Let us say that your monitor server is called op5 monitor you can reach the documentation on the following location https op5 monitor monitor op5 nacoma Documentation html index html Itis generated by doxygen and contains information like classes and methods used in the op5 Monitor configuration tool C op5 1 op5 Monitor API and CLI 31 op5 Monitor Configuration CLI op5 Monitor Configuration CLI This is a tool used to edit the op5 Monitor object configuration You may use this one to add and remove hosts Services contacts e timeperiods You may also e list objects e save configuration undo configuration force import of the config files to the configure database Exectuing the op5 Monitor CLI To exectue the op5 Monitor CLI 1 Logon to the op5 Monitor server as root 2 Exectute the following command php opt monitor op5 nacoma api monitor php The above example will give you
87. iguration with the following command mon node add peer02 type peer 3 Create and add ssh keys to and from the second peer by as root user mon sshkey push all mon sshkey fetch all 4 Add peer01 as a peer at peer02 mon node ctrl peer02 mon node add peer01 type peer 5 Make the first initial configuration sync mon oconf push 6 Restart and push the logs from peer01 to peer02 mon restart sleep 3 mon oconf push Adding a new peer In this instruction we will have the following hosts peer01 peer02 e peero03 This is the new one 1 Scalable Monitoring 11 C op5 Load balanced monitoring To add a new peer 1 2 Login to the peer01 as root user over ssh Add the new peer to the configuration on peer01 mon node add peer03 type peer Get all ssh keys in place mon sshkey push all mon sshkey fetch all Add the peers to one and each other mon node ctrl peer02 mon node add peer03 type peer mon node ctrl peer03 mon node add peer02 type peer mon node ctrl peer03 mon node add peer01 type peer Manually push the op5 Monitor objects configuration to the new peer mon oconf push Restart monitor on peer01 and send the configuration to all peers again mon restart sleep 3 mon oconf push Removing a peer In this instruction we will remove a peer called peer02 The peer will be removed from all other peers configurations To remove a peer 1 2 Log in to peer01 as root over ssh
88. in the configuration without saving it before you are satisfied The table below describes the workflow Step Description 1 Configure opens and the configuration files are compared to the data in the database If then else The configuration import the Do nothing besides files are newer than configuration files open up the the last change of the into the Configure Configure database database 2 Edit the configuration 3 Save the changes to the Configure database by clicking Apply on the object you just added changed 4 When you are done with editing the configuration save the Configure database to the configuration files by clicking Save 20 1 op5 Monitor configuration tool C op5 Introduction Step Description 5 A preflight check is made on the configuration before it is exported to the configuration files If then else the preflight check an error message is the configuration in founds any error displayed and the Configure nothing will be database is exported exported and op5 Monitor is reloaded C op5 1 op5 Monitor configuration tool 21 The basics The basics In The basics section we will take a look at the basic step you need to know about when working with Configure Start working There are many ways to jump in to Configure and start working with the configuration of op5 Monitor To s
89. in this hostgroup and create and edit services but not create new hosts or se other hosts than jsmith is assigned to 1 op5 Monitor configuration tool 37 C op5 Main objects Select the following options Role name DB Admin Role members jsmith host Disallow editing of existing objects Disallow creating new objects Only contacts can access hostgroup Only contacts can access service Only contacts can access contact No access contactgroup No access timeperiod Full access command Full access servicedependency No access serviceescalation No access servicegroup Only contacts can access hostdependency No access hostescalation No access FILE No access access rights No access Then you logout as admin and login with the user jsmith Now jsmith can only access his hostgroup and change the services associated in the hostgroup Databases Time periods Time periods is time defining objects that span over a week You can define included time for each day of the week in the time period definition You can also use already defined time periods as excludes add exceptions based on dates and ranges of days The time period objects are used at many places in the configuration Most noticeably are in the contact objects where the time periods defines when notifications should be sent out You can also use time periods to define when a s
90. iod During this period the notifications are sent out if any alerts are created It can be any time period defined in op5 Monitor e permissions to view a objects in the monitoring part of op5 Monitor A contact is not the same as the login account given access rights to the system Required directives The following directives are required for a service object s contact_name e host notifications enabled service notifications enabled e host notification period service notification period e host notification options service notification options host notification commands service notification commands The table below describes the required directives for the host object Directive Type Description contact name string The id of the contact object 30 1 op5 Monitor configuration tool Main objects C op5 Directive Type Description host notifications enable yes no Used to determine whether or not d the contact will receive notifications about host problems and recoveries service notifications ena yes no Used to determine whether or not bled the contact will receive notifications about service problems and recoveries host notification period time period The time period when the contact object will receive any host notifications service notification perio time period The time period when the contact d object will recei
91. le Instances For simple widgets to enable multiple instances you will only have to add one single line of code to the constructor protected duplicatable true This is a simple hello world widget that can be duplicated php defined SYSPATH OR die No direct access allowed class My widget Widget extends widget Base protected duplicatable true public function index print Hello world If your widget is more complicated you will probably have to change more things 108 1 Widgets Widget Porting guide C op5 First it s likely that your widget includes fields with the 1d attribute Doing so is no longer valid you must either create a globally unique name using both the widget s name and instance id or you should use a class attribute instead Then in your javascript you must take care to use a combined selector to retrieve the HTML node you want to for the correct widget instance In the past a common pattern in javascript files was the following document ready function var my widget new widget my widget widget content my widget setting change function my widget save custom val this val my widget setting do something n n Again if do something is only a widget reload you can remove this code completely If you do more things you need to take more care This is how the above should be written with new style multi
92. le Members Assign members to the role Host Setup how the users are going to be allowed to modify host objects Hostgroup Setup how the users are going to be allowed to modify hostgroup objects Service Set up how the user are going to be allowed to modify services Contact Setup how the users are going to be allowed to modify contact objects Contact Group Setup how the users are going to be allowed to modify contactgroup objects Time Period Setup how the users are going to be allowed to modify timeperiod objects Command Setup how the users are going to be allowed to modify command objects Service Dependency Setup how the users are going to be allowed to modify servicedependency objects 34 1 op5 Monitor configuration tool C op5 Main objects Variable Function Service Escalation Setup how the users are going to be allowed to modify serviceescalation objects Service Group Setup how the users are going to be allowed to modify servicegroup objects Host Dependency Setup how the users are going to be allowed to modify hostdependency objects Host Escalation Setup how the users are going to be allowed to modify hostescalation objects These permissions have no effect if a user is authorized for all hosts under Access Rights Admin Role Example In this example we will create a user that has the ability to see all hosts in the assigned hostgroup and can edit services in this hostgroup in this case Mysql srvl
93. lect how you want to propergate your settings Propagation format for multi Replace value attributes p M You can choose the following options Option Description Replace Replace the destination values Append Append the source values to the destination values Subtract Subtract the source values from the destination values 7 Click Go 8 Click Save Bulk delete Bulk delete is powerful tool to remove several host or services at once Bulk delete support the following objects Hosts Services 72 1 op5 Monitor configuration tool C op5 Make things easy Hostgroups Servicegroups Contacts Contactgroups Commands Time Periods As an example we will delete two services Ping on two different hosts but the process is similar on all objects listed above To delete multiple services this is preformed trough Configure 1 Select a host which services you want to delete and click Go Configure This is the op5 Monitor Configuration tool the place where you add new hosts change notification seti handle contacts and so on Basically just about every configuration related setting is managed from thi To get started select the prefered action below dB Host Groups g Edit Host Filter by regular expression Clear 172 27 86 1 gt R Tip If you need help vou can always click on the MIA lll Click Services for host in the right menu 8B Scan host for SNMP in
94. lo world php Type in the following content in the file php defined SYSPATH OR die No direct access allowed class Hello world Widget extends widget Base public function options Load default options like refresh frequency options parent options Add option for specifying a custom greeting widget_name option_name label option type special options default Soptions new option hello world greeting Greeting input array World return Soptions 96 1 Widgets C op5 Writing a simple widget public function index get the widget arguments based on the options above Sarguments this get arguments require this gt view_path view j 4 Save and exit from your editor Writing the view file To write the view file 1 Go to the widget folder cd opt monitor op5 ninja application custom_widgets hello world 2 Create a file with your favorite editor called view php 3 Typein the following content in the file lt php defined SYSPATH OR die No direct access allowed gt Hello lt php echo Sarguments greeting gt 4 Save and exit from your editor Multiple instances Itis possible to spawn multiple instances of a custom widget like the ones we are shipping in op5 Monitor You could use this to create a gazillion of Hello World widgets or you could create a widget that has multiple dat
95. lugins C op5 Introduction Introduction op5 Monitor is shipped with many plugins that cover most monitoring needs But what to do if one of your corporate applications can not be monitored straight out of the box Often you can find a plugin at www nagiosexchange org and since op5 Monitor and Nagios uses the same plugin format you can often simply download a plugin put it in opt plugins custom and start using it However if you can not find a suitable plugin anywhere you might have to write your own plugin Since the plugin interface 1s very straight forward anyone with a fair amount of UNIX scripting experience can do this C op5 1 Plugins 81 Paths and macros Paths and macros All standard plugins shipped with op5 Monitor is installed in opt plugins The macro you use to reach the plugins folder is SUSER1 The plugins you add to the system by your own must be placed in opt plugins custom And they will then be reached with the following macro path SUSER1 custom The reason for placing your own plugins in opt plugins custom 1s because then it will not be touched by any upgrade from op5 82 1 Plugins C op5 Before you start Before you start Be for you can start develop you own plugins you need to make sure you have ssh access or terminal access to your op5 server the possibility to transfer files to your op5 Monitor server any kind of editor vim and jed are installed by default on your op5 Monitor
96. manual is targeted for a technical audience The manual covers how to use and configure op5 Monitor through its web interface For configuration using direct console access or SSH see the op5 System manual C op5 1 Introduction About op5 Monitor About op5 Monitor op5 Monitor is a highly flexible monitoring system for monitoring of IT infrastructure op5 Monitor is based on the widely known open source monitoring system Nagios op5 Monitor is used and configured in a web interface using any standard browser The most common browsers Internet Explorer Firefox and Opera have been tested The interface is protected by using both authentication username and password and by SSL which enables a secure manner for accessing the web interface using encryption 1 Introduction About op5 Monitor C op5 C op5 About agents This chapter covers the following topics Agents Subject Page Subsections Introduction 6 op5 NSClient 7 Installing and configuring op5 NSClient on page 7 Plugins used with op5 NSClient on page 7 Configuration files on page 7 Changing the configuration on page NRPE Installing NRPE on page 10 Configuring NRPE on page 10 Configuring NRPE on page 10 Adding commands to NRPE on page 11 Plugins used with NRPE on page 12 Novell Installing Novell MRTGEXT on page 13 More information on page 13 Windows SyslogAgent Installation on
97. n the drop down list Edit Host Filter by regular expression Clear gbg fw1 1 Go 2 Click Go Click Services for host Services for host example host The add new service pages is shown 4 Type ina service description Q service description cpu usage 5 We will use the check nt cpuload command for this service Type in as many chars you need in the filter by regular expression field until the command shows up Q check command Filter by regular expression Clear check nt cpuload B Syntax help Edit chi 6 Click Syntax help to see what arguments are needed for this command Command line of selected check command opt plugins check nt H HOSTADDRESS p 1248 v CPULOAD 1 ARG1 Plugin syntax This plugin collects data from the NSClient service running on a Windows NT 2000 XP 2003 server Usage check nt H host v variable p port w warning c critical 1 params d SHOWALL t timeout T timeout status Options h help Print detailed help screen V version Print version information Options H hostname HOST You can see that we have a macro called ARG1 This is the first and in this case the only argument we need to give to this command 7 Click Syntax help again to hide the help text 8 Type in the argument Q check command args 60 90 95 9 Click Apply changes C op5 1 op5 Monitor configuration tool 57 Managing objects 10 Click Save Modifying a se
98. nd notifications to and gives access to this host for users who do not have access to all hosts Services notification interval integer Number of minutes between renotifications Set this to 0 if you only want to have one notification sent out notification period time period During this period the notifications are sent out if any alerts are created It can be any time period defined in op5 Monitor A service can be practically any thing that you can measure and monitor on a host It is almost only your imagination and programming skills that sets the limit for what you can monitor with a service A service e must be connected to a host e can check things by tcp agents snmp etc e usea check command Commands on page 40 to communicate with the plugin Plugins on page 40 that gets all the data Required directives The following directives are required for a service object host name service description e check command e max check attempts e check interval retry interval e check period 28 1 op5 Monitor configuration tool Main objects notification_interval notification_period contacts contact_groups C op5 The table below describes the required directives for the host object Directive Type Description host name host name object The host the service is connected to Service description string This is the id of the object It m
99. nd at our support site http www op5 com support downloads upgrade guide 1 Upgrade 169 C op5 Upgrading with yum Upgrading with yum To upgrade with yum 1 2 Login to the op5 Monitor server via ssh as the root user Check what packages that is pending for upgrade by execute yum check update If you want to apply the upgraded packages execute yum update 170 1 Upgrade Upgrading with tar gz files C op5 Upgrading with tar gz files Before you start with the upgrade you need to make sure you have the login to the download sections at www op5 com Otherwise you will not be able to download the tar gz files To upgrade with tar gz files 1 oa fF WwW NM Download the tar gz file from_www op5 com get op5 monitor download download archive Find the tar gz file you need You might need to open up the Archived files at the bottom of the page Upload the tar gz file to the op5 Monitor server Login to the op5 Monitor server via ssh as the root user Untar the tar gz file in the root folder Go to the folder that was extracted from the tar gz file Now start the upgrade by executing the following script install sh op5 Scalable Monitoring Scalable Monitoring About Scalable Monitoring This chapter covers the following topics Subject Page Subsections Distributed Monitoring 3 Introduction on page 3 Before we start on page 3 The configuration on page 4
100. nd make sure it is called manifest xml Creating the widget package Now your widget should be ready and located in the filesystem of your op5 Monitor server In this instruction we assume that your widget is called my own widget To create a widget package 1 Goto the folder above the my own widget folder where your widget is located 2 Create the package with the zip command like this zip r my own widget zip my own widget 100 1 Widgets C op5 Access widgets externally Access widgets externally To access a widget from an external site like an intranet or network status page Server side setup To configure this you need to configure a user edit php settings for external widgets and insert an iframe on your external web site Contact configuration To set up a widget contact you first need to create a access right When that is configured create a contact with the same name as the access right and specify which contact groups s is should be a member of Same as a normal contact the contact groups defines which hosts is visible PHP settings After the contact is created log in to the op5 Monitor server using SSH cp opt monitor op5 ninja application config external widget php opt monitor op5 ninja application config custom cd opt monitor op5 ninja application config custom Edit the file external widget php with your favorite editor This file has two variables widget name specifies which widge
101. ndled by Kohana But this chapter will only describe the widget development in it self In this chapter we will focus on creating a small hello world widget C op5 1 Widgets 93 The widget basics The widget basics The widget rules All widgets need to follow a few rules They need to have a correct File structure e Widget class View file File structure The widget has to be placed in a folder with the exact name as the widget AII default widgets shipped with op5 monitor is placed in opt monitor op5 ninja application widgets And the file structure below the widgets folder looks like this v B3 widgets Vv E widget name P css gt LJ images gt is view php widget name php But as we are developing our own widget we need to place it in opt monitor op5 ninja application custom widgets Everything is case sensitive here Widget Class Each widget has one main widget class It needs to be in a PHP file with the same name as the widget you are creating and must must be called an uppercased version of the same name with a Widget suffix It should have a function called index that prints the widget It may optionally also have an options function that specifies custom widget arguments as shown in the example Writing the widget file on page 95 94 1 Widgets The widget basics View file C op5 If you call your widget hello world then hello world php can contain a simple echo
102. ndow Original string Translation Adminzindex Admin startpage logout Edit user Add new user Add user Name Save the file when done Changing basic language file settings Now the last thing we shall do before we upload the files to the server is to change some of the basic settings in the language file The things we are going to change is Team Language Country To change the basic language file settings 1 2 3 Open up the language file sv po in this example in Poedit In the main menu click Catalog gt Settings Change the Team to what ever you want and the Language and Country to reflect the language you are creating In this example Language Swedish Country SWEDEN Click OK 124 1 Localization Adding a new language C op5 Applying the new language to the server Now the last thing we need to do is to send up the new language to the server To apply the new language to the server 1 Copy the new language folder in this example sv and its content to the following folder on the op5 Monitor server opt monitor op5 ninja application languages Open up your browser and change the settings so the new language will be the first one to use In FireFox this is done in Preferences Content Languages Go to the op5 Monitor user interface login page If you have translated all lines you will now see the login page in your new language C op5 About graph templat
103. nfiguration Y Save your current op5 Monitor configuration 3 Now your backup is created and can be restored at any time you like BACKUPS ACTIONS backup 2011 10 28 10 26 B4 4 Click the backup archive name to download and save the backup archive somewhere else 166 1 Backup C op5 Restoring a configuration backup Restoring a configuration backup To restor a op5 Monitor configuration backup 1 Click Backup Restore in the main menu Q Backup Restore 2 Click restor icon on the configuration backup you like to restore Now the backup has been restored C op5 About upgrade This chapter covers the following topics Upgrade files Subject Page Subsections Introduction 168 Upgrading with yum 169 Upgrading with tar gz 170 167 TR ae gas o p 9 Introduction op5 Monitor is upgraded in the same way as the other op5 products If you have an op5 Appliance system you can read about the upgrade procedure in the op5 Appliance system manual This chapter will only cover how to upgrade an op5 Monitor software version We will learn how to upgrade with the e Linux command yum tar gz files you may download from our support site If you are upgrading from one main version to an other eg from version 4 to 5 you need to use the tar gz files found at our support site When upgrading over more than one main version eg from version 3 to 5 you shall follow the Upgrade guide fou
104. ng objects Host and service escalations works exactly in the same way so we will only take a look at host escalations from now on Adding a host escalation In this guide we will add a small escalation chain that does the following First notification 1s sent to the support group e After 10 minutes the second the last one is sent to the sysadmins group To add a host escalation 1 On the start page choose the host you like to add an escalation to in the drop down list Edit Host Filter by regular expression Clear gba fw1 1 Go 2 Click Go 3 Click Escalations Escalations 4 Add the escalation number one a Choose the contact group that shall have the notification V contact grows e Selected sysadmins gt support group lt b Set the start number in the escalation chain Q first notification 1 C Set the end number in the escalation chain Q last notification 1 d Setthe notification interval which is the number of minutes to wait to the next notification Q notification interval e Choose the time period when this escalation will be in use escalation period B 1 Ifthe start number is 1 and the end number is two it means that the first and the sec ond notification will be handled by this escalation C op5 1 op5 Monitor configuration tool 65 Managing objects Choose what states this escalation will be valid for escalation options M Down Unreachable Recovery
105. nitor In this section we will create a very simple plugin We will write it as a bash script in a ssh connection to the op5 Monitor server This plugin will not actually be very useful but we will use it to describe the steps needed when you starts to add other more useful plugins Creating the plugin To create a simple example plugin as a bash script 1 cd opt plugins custom touch helloworld chmod 755 helloworld 2 Open up the script with your favorite text editor and type in the following example plugin bin sh echo WARNING Hello world exit 1 3 Saveand exit your editor Execute it from the terminal 5 helloworld WARNING Hello world echo 1 The script prints the status output WARNING Hello world echo prints the return code of the last executed command Configuring op5 Monitor to use the plugin To configure op5 Monitor to use the plugin 1 Goto Configure and chose Commands 2 Addanew command with command name check local helloworld command line SUSER1 custom helloworld 3 Click Apply and then Save Now you may use your check command with a service 88 1 Plugins C op5 Creating a more complex plugin Creating a more complex plugin In this section we will create a more complex and useful plugin compared to the one we created in Adding your first plugin to op5 Monitor on page 87 We will stick to bash because of the simplicity We will create a plugin that checks that the
106. not read by Configure 1 2 6 Open up a ssh connection to the op5 Monitor server and login as root Create the following file with an editor of your choice opt monitor op5 nacoma custom config php Add the following code to the file you just created php notouch file prefix Create a configuration file with as a prefix to the file name like this touch opt monitor etc custom objects cfg Add the file to the opt monitor etc nagios cfg with by adding the following line below the other cfg file variables in nagios cfg cfg file opt monitor etc custom objects cfg Restart op5 Monitor Service monitor restart Now you may add your objects to the new configuration file and they will not be loaded into Configure But you can still see the objects using View config as it is described in the op5 Monitor user manual 78 1 op5 Monitor configuration tool Features not supported by Configure C op5 op5 About plugins This chapter covers the following topics Plugins Subject Page Subsections Introduction 80 Paths and macros 81 Before you start 82 The plugin interface 83 Status output on page 83 Performance data on page 84 Return code on page 85 Adding your first plugin 87 Creating the plugin on page 87 to apa Monitor Configuring op5 Monitor to use the plugin on page 87 Creating a more 88 complex plugin More information 89 79 80 1 P
107. npe aene tet doeet dee aD Pa eevee Muted e RE REA RA ees 7 Configuration Tes saae estt Meek tome estore hag wie etes union e Nite eaat 7 Changing the configuration eri tie ert rep ente t tue px pa cue 8 To change the configuration sesssssseesee eene 8 Pun ird MITAD TTL IT ICI I 10 Installing NIRPE c 10 Configuring INISPE 24 2528 cre hres tas ferit itecto M fiers a a iaa iiaa kaeni 10 Adding commands to IRBPE eere eder iet priced teens 11 Plugins used with NRPE x deett tener pendente and 12 rou Me E 13 Installing Novell MESTGE XT uccisi trtrtetge fece Grin Unpet hti bao ie ocas ton edocet a id 13 More information M M 13 Windows SyslogAgent eeeeeeeeeseeeeeeeeeeeenenen nennen nennen nnne nennen 14 Lostellatoria cote E taste det e ipee c mui OR dusk n ne bERUS ORE PARERE 14 LOGI ACUI o EE 14 Configuration ose oda Soto cht S ed Cao Qro ee ient de Mud tha oa Cdi els 15 Configuring the elementary functions seeseeeeen 15 Monitoring objects configuration About Monitoring objects configuration 17 IntrodUCtON pose 19 VVOTKIOW stesse oit ite Qc Sedi nemo Oe a Lot ne Etras tUi Mute 19 The DASICS cc ET 21 circu S WOKING ee ce 21 leepiesei lc P 21 DAVES the CHANGES ss cedet be Hee PR Rao bra lebe eben a utn 22 Undo CHANGES isst atenta tet one erst tdt or edges a Lt trsd bates dri tede heeds 23 Historical Configur
108. ns 149 Dial up notification Dial up notification Many of the modern mobile phones are only giving you one tiny signal when a sms arrives If you are on duty during the night you might not wake up or if you are in a very noisy environment it might take some time for you to notice the arrived sms There for we have included a dial up notification in op5 Monitor This is a very simple but effective notification that works like this Table3 Dial up notification workflow Step Action 1 op5 Monitor is scheduling a notification 2 The notification goes through all the filters 3 The notify dial pl script is called with the following command line opt monitor op5 notify notif dial pl lt mobilephonenumber gt 4 notify dial p1is shutting down smsd 5 notify dial pl tries to call the lt mobilephonenumber gt If the line is busy or no one answer the call in 45 seconds notify dial pl will hang up and try again two more times before it quits 6 The user answer the call and notify dial p1 hangs up 6 notify dial plis starting up smsd again and the execution is over Adding a dial up notification command This is done in two steps e add the command e configure the contacts To add a dial up notification command 1 Login to the op5 Monitor user interface and go to Configure 2 Click Commands 3 Addanew command with the following settings command name notify by dial command line SUSER3
109. o 1 host objects 1 service objects and 1 hostgroup objects by you and 1 info Created new host object My Server by jsmith at 2011 09 15 14 19 Created new service object My Server PING by jsmith at 2011 09 Created new hostgroup object DEMO group at 2011 09 15 14 20 04 3 5 14 19 23 Are you sure you want to save your new configuration Yes save No am not done yet When done click Yes save to write all the changes to disk Now the preflight check is preformed and the data is saved to the configuration files Preflight configuration check turned out ok Monitor has successfully loaded the new configuration Note if two users with the same permissions are editing the same host all configuration regarding the host or service will be saved Undo changes Sometimes it might be handy to reset the configuration to the state it was in where you started to work in Configure The only thing you have to do then is to undo your changes The undo function will only work as long as you do not have saved the Q data to the configuration files To undo the configuration changes Click undo icon at the top of the Configure page 24 1 op5 Monitor configuration tool C op5 The basics This will revert the your changes since the last successful preflight check Changes reverted You might want to do a c te rei To undo all users changes click on complete reimport This will re read the c
110. o dU Es 53 Renaming a Host Deu b cec eiie E Mns 53 Network autoscan eeeesessesssseseseseeeeene rennen renes nnn n nnne a da 53 Adding a new autoscan configuration seem 54 Adding a host to blacklist oerrinne ERTE TTEA 54 Theres lt 2 d eee irt He d t ilo est ld perdita iai met es 55 fluere E 55 AGING A Service a see tete e ge Eo pb E E Hed EP E aeg n uiae Ee dod 56 Modifying a service eiecit nennen De pna a 57 Contents TeStthiS SOrviCe ier iie ot eee ec aaa pacha sha ees easter iere tat een ava reb eke cand 57 Deleting a Service iieri inei eet e di e Ten a eec 58 Scanning host for network services ssssssseee eene 58 Scanning a host for snmp interfaces sssssssssseeee eee 59 Scanning host for windows services sssseee 60 Scan for services using agent ssssssssseeen eene 60 Scan for service using WMI sssssssseeee enne 61 Escalations io Uem tb P rete edades 63 Adding a host escalatlon 1 i iae ie aet apego d deco p b eb qe 64 Modifying a host escalation sssseem emen 66 Deleting a host escalation sssssssseeeene enne 66 Access rights and COMEACIS Liste 0 stat othdetonterprtaccedattesastatuds Posse bu tcu dut iit lecta 67 Connecting access rights to contacts ssssssssssee e 67 Make thints easy ciceescccssccswestensececsncscoedsne
111. ok like this Sconfig driver array LDAP gt AD Ninja gt Local As we only want to change the authentication method we need to remove everything that we do not want to change This is important as otherwise new updates might not be implemented Also keep the firtst row lt php defined SYSPATH OR die No direct access allowed this is used for security reasons 162 1 LDAP authorization Configuring op5 Monitor C op5 C op5 About backup Backup This chapter covers the following topics Subject Page Subsections Introduction 164 Backup Restore actions on page 164 Backing up the 165 configuration Restoring a 166 configuration backup 163 164 C d o p 5 Introduction The op5 Monitor GUI has got a built in backup feature This is not supposed to be a replacement to op5 backup The configuration backup is only backing up the op5 Monitor A configuration nothing else Backup Restore actions In the list of backups the second column is called ACTIONS This is the functions you will find there from the left to the right e View what files are included in the backup Restor the backup Delete the backup C op5 1 Backup 165 Backing up the configuration Backing up the configuration To backup your op5 Monitor configuration 1 Click Backup Restore in the main menu QQ Backup Restore 2 Click Save your current op5 Monitor co
112. ome amount of services up and running for the delivered service to be functional The number of sub elements that has to be OK is specified in percentage or actual amount If the number of sub elements that are OK are equal or more than the at least number or percentage then the group will be OK or else the group will get the worse state of its sub elements Examples e Simple At least 2 num of OK OK CRITICAL CRITICAL gt OK Simple Atleast 3 num of OK OK WARNING CRITICAL gt CRITICAL e Simple At least 3 num of OK OK WARNING WARNING gt WARNING Simple At least 50 of OK OK WARNING CRITICAL gt OK e Simple At least 50 of OK OK WARNING CRITICAL CRITICAL CRITICAL 138 1 Business Process C op5 Business groups At least At most Means to express the idea that you need some amount of services up and running to be functional and lesser amount to be semi functional e g with degraded performance Two thresholds are specified percentage or actual among is possible If the number of OK sub elements is grater or equal than the OK threshold then group is OK If the number of OK sub elements is less then the OK threshold but greater or equal than the WARNING threshold then group is WARNING If number of OK sub elements is less then the WARNING threshold then group is CRITICAL Examples e Atleast 2 1 num of OK OK WARNING CRITICAL gt OK Atleast 3 2 num of OK
113. onfiguration files and all changes will be reverted If any changes were made directly into the configurations files these changes will now be loaded in to the web configuration Import forced Configuration has been imported overwriting database changes Historical Configuration Changes Historical configuration changes can be used to track changes in the configuration In the log you will find all changes in the configuration on objects that you have access to To access the historical configuration changes log go to Configure and click on the icon in the upper right corner D Limited users will only see changes that are made to the hosts and services they are contacts for Full access users will see all changes User Object type Object Action monitor hostgroup DEMO_ group Created new object DEMO_group jsmith host My_Server Created new object My_Server jsmith service PING on host My_Server Created new object My_Server PING monitor service smtp on host WinServer Created new object WinServer smtp C op5 1 op5 Monitor configuration tool 25 Main objects Main objects The configuration is based on objects There are several types of objects each one defining different things in the monitoring process Each object consists of a object name and a couple of variables that needs to be configured For example on a host object you configure e host name address notifications e active checks
114. ontrol panel Now you can proceed with the installation of the new version as usual Note that your previous settings will be used directly when the installation is complete Configuration When the configuration tool is started the following window should be displayed Datagram SyslogAgent Configuration X fe e Enable mirror delivery Configuring the elementary functions To configure the elementary functions and start the SyslogAgent started follow the following steps 1 Press Install this will install the SyslogAgent as a service 16 1 Agents C op5 Windows SyslogAgent 2 Enter the IP address in the field Syslog Server This IP should be the one to your op5 Logserver or op5 Monitor server 3 Make sure the check box Enable forwarding of event logs is checked 4 Press Start Service Your SyslogAgent is now configured and should be sending logs to your op5 Logserver or op5 Monitor server C op5 Monitoring objects configuration About Monitoring objects configuration This chapter covers the following topics Subject Page Subsections Introduction 19 About Monitoring objects configuration on page 17 Workflow on page 19 The basics 2 Start working on page 21 Applying changes on page 21 Save the changes on page 22 Undo changes on page 23 Historical Configuration Changes on page 24 Main objects 25 Required directives on page 25 Hosts on page 25
115. opment take a look at the Nagios plugin development guidelines http nagiosplug sourceforge net developer quidelines html 90 1 Plugins More information C op5 C op5 About widgets This chapter covers the following topics Widgets Subject Page Subsections Introduction 92 The widget basics 93 The widget rules on page 93 Writing a simple widget 95 Creating the directory structure on page 95 Writing the widget file on page 95 Writing the view file on page 96 Multiple instances on page 96 Adding the widget to the widget table on page 96 Removing a widget on page 97 Viewing the widget on page 97 Take your widget a step 98 further Access widgets 100 Server side setup on page 100 externally External website setup on page 100 Widget Porting guide on 102 Javascript on page 102 page 102 View on page 102 Controller on page 103 Extra Settings on page 106 Multiple Instances on page 107 91 92 1 Widgets C op5 Introduction Introduction In the op5 Monitor user manual we describes how the widgets works in the user interface There you can read about how to hide and show them move around the widgets change the widgets refresh rate restore to default settings In this chapter we will take a look at how you could create your own widgets The op5 Monitor user interface is using Kohana as framework some of the back end parts for the widgets are ha
116. ops Monitor administrator manual op5 Monitor administrator manual 5 Version 5 6 Rev 1 0 0 Oop op5 Monitor administrator manual Version 5 6 Rev 1 Author Professional Services 2012 op5 AB op5 and the op5 logo are trademarks service marks registered service marks or registered trademarks of op5 AB All other trademarks service marks registered trademarks and registered service marks mentioned herein may be the property of their respective owner s The information contained herein is provided AS IS with NO WARRANTY OF ANY KIND INCLUDING THE WARRANTY OF DESIGN MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE op5 web site WWwW Op5 com op5 support www op5 com support op5 and the op5 logo are trademarks service marks Oo 5 registered service marks or registered trademarks of op5 AB D Contents Contents Introduction About Introduction ood te bila wie incnkdadnaeaecebcclabahiqes ede diedebelads 1 Using this Manual iccicissedasccesctavecsenasssedcnchecndencatsapedstunvaieecnssecuctcuadtuacasekctueuida das 2 About OPS Monitor eret reiner nana Rn o naar aan yeux Ea dn YR Ana n Raya uy Eau n eda a edo vaa Raus 3 Agents Abo tagentsiai e P 5 IntrodUCtON poem cs 6 OPS NS CIIONCHH Me RR 7 Installing and configuring op5 NSClient 0 eee ceeeeeeeeeeeeeeeeeeeeneeeeees 7 Plugins used with op5 NSClientrt eeeeeeceeeeeeeeenennenn nnne 7 check ME E 7 check
117. or a host 42 1 op5 Monitor configuration tool C op5 Groups To add a service to a host group go to Configure and Host Groups Choose the host group you want to add services to then select Services for hostgroup Hostgroup Filter b pres Clear windows servers Go Need help Services for hostgroup windows servers For example a windows servers host group could contain the checks that are common for all windows servers By doing this you will only need to change command arguments on the service in the host group instead of changing the arguments on all windows host If you add new checks to the service group all hosts in the host group will get the new service once you save your configuration Ifa host group service and a host service should get the same name the host group service will be used the host service will still be visible in the configuration and If the host is lifted out from the host group the host service will become active Nested host groups Host groups can be connected to each other When nesting host groups together the services on host groups also will inherited to the nested host group This only work one way For example Host group A has service X and host 1 is a member of host group A Host group B has service Y and host 2 is a member of host group B If host group B is added as a member of host group A then host 1 will get service Y but host 2 will not get service X
118. ost escalation 1 On the start page choose the host you like to modify an escalation on in the drop down list 2 Click Go Click Escalations Escalations 4 Choose the escalation you like to modify Add new hostescalation Go 5 Click Go 6 Make the modifications you like to do and click Apply changes 7 Click Save Deleting a host escalation To delete a host escalation 1 Onthestart page choose the host you like to delete an escalation from in the drop down list Edit Host Filter by regular expression Clear gbg fw1 1 Go 2 Click Go 3 Click Escalations Escalations C op5 1 op5 Monitor configuration tool 67 Managing objects 4 Choose the escalation you like to modify Add new hostescalation 4 Go 5 Click Go 6 Click Delete Delete 7 Click Save Access rights and contacts To be able to login to op5 Monitor you need to have a user described in Access rights on page 31 But you need to have a contact described in Contacts on page 29 to be able to receive notifications and in some cases even be able to see any hosts or services By connecting access rights to a contact you will be able to login and get notifications with the user created in access rights So basically what you need to do is to configure a new contact Add the contact to an existing contact group or create a new contact group specific for the new contact If you created a new contact group make sure to add the contact grou
119. out of the box Active Directory structure with domain name op5 com e all users reside in the OU users To configure op5 Monitor 1 Logon as root on op5 Monitor and start the configuration script op5 authconfig 2 Now a series of questions will be asked answer yes to the first question about converting from the old op5 auth system then chose ad as authentication method Below are the rest of the questions and answers provided for our lab environment Question Answer LDAP Server 192 168 1 97 LDAP Search base dc op5 dc com Where are your user DN s cn Users dc op5 dc com In what sub tree are your groups located cn Users dc op5 dc com Group for admin access op5admins Username for the server to connect to AD with op5auth op5 com Enter bind password opSauth s password okckckckckck kk 3 Finally accept the change to your authentication config 160 1 LDAP authorization C op5 Configuring op5 Monitor 4 Make sure the configuration file looks ok cat etc httpd conf d op5ldapauth conf Location AuthzLDAPServer 192 168 1 97 AuthzLDAPUserBase cn Users dc op5 dc com AuthzLDAPGroupBase cn Users dc opb5 dc com AuthzLDAPUserKey sAMAccountName AuthzLDAPBindDN op5authGop5 com AuthzLDAPBindPassword l4bp4SSwOrD require valid user AuthzLDAPUserScope subtree AuthType basic AuthzLDAPMethod ldap AuthName OP5 Monitor Access Location 5
120. p for the hosts and services that you want to make available in the customized view Add new access rights and connect it to the contact you created earlier Connecting access rights to contacts To connect access rights to a contact 1 Configure a new contact 2 Addthe contact to an existing contactgroup or create a new contactgroup specific for the new contact If you created a new contactgroup make sure to add the contact group for the hosts and services that you want to make available in the customized view 3 Configure a user in access rights with the exact same name as the contact you created 4 Setthe options for the new access right When selecting options do not use the last four options authorized for all By doing this the new user will only see the hosts and services that uses the contactgroup that he is a member of 68 1 op5 Monitor configuration tool C op5 Make things easy Make things easy Profiles Creating a Profile To create a profile 1 o0 Ff WS NM On the start page choose the host you like to create a profile of in the drop down list Edit Host Filter by ar ex Clear gbg fw1 1 Go Click Go Click the Clone button Select the services you wish to include Select Save as Profile Enter name and description for the profile you are creating Click Clone You are then presented with the option of creating clones based on this new profile If you do not wish to do this now you can simply
121. page 14 Upgrading on page 14 Configuration on page 15 1 Agents C op5 Introduction Introduction Most of the monitoring in op5 Monitor is used with the help of agents The plugins are contacting the agents and let them do the job There are mainly four agents available for download at the op5 support site Agent Environment op5 NSClient Microsoft Windows NRPE Unix Linux MRTGEXT Novell Windows SyslogAgent Microsoft Windows C op5 1 Agents op5 NSClient op5 NSClient This is the agent used for monitoring Windows type operating systems This agent has the ability to function as a drop in replacement for NSClient providing the same features as NSClient combined with the ability to execute scripts on the monitored Windows server Installing and configuring op5 NSClient The installation and configuration of op5 NSClient is covered in detail in the op5 video tutorial How to monitor windows servers http www op5 com support documentation video tutorials Plugins used with op5 NSClient There are mainly two plugins that is used to communicate with op5 NSClient e check nt e check nrpe check nt This plugin is used for all basic tests like cpu e memory disks But it can also be used to check Windows services performances counters check nrpe check nrpe can also be used in the communication with op5 NSClient This one is normally used when you are
122. performing checks on the Windows server with custom scripts Configuration files NSClient operation is configured in a couple of plain text files called e NSC ini e opS5 ini 1 Agents C op5 op5 NSClient e custom ini They are located in the install directory Table 1 Description of the configurations files File Description NSC ini This is the standard configuration file This contains the default settings for NSClient A This tile might be overwritten during an update of NSClient op5 ini This is a op5 specific configuration file Here are the changes made by op5 entered A This tile might be overwritten during an update of NSClient custom ini This is where you shall place your own files It will never be overwritten during any update of NSClient The default configuration provided is fully functional but there are some options that likely need to be changed Changing the configuration To change the configuration To change the configuration open the custom ini file using your favorite text editor e g WordPad This file is empty and but take a look at NSC ini to view all settings Read the nsc ini file carefully to get a complete understanding of all configuration options Lines starting with semicolon are comments Before the changes will take effect NSClient must be restarted Options most likely in need for configuration are described bellow se
123. ply Changes and save your configuration Go to the host in op5 Monitor and click on Extra notes SCREENSHOT Click on Create page Edit the information and click on Save Deleting a wiki page If you edit a page and remove all its content then DokuWiki will delete the page and the associated page name For more information about the docuwiki http www dokuwiki org manual 1 Wiki Managing wiki pages C op5 C op5 Third party configuration import About Third party configuration import This chapter covers the following topics Subject Page Subsections Introduction 2 Pre requirements on page 2 Limitations on page 2 Import configuration 3 Preparing nagios configuration on page 3 Import nagios configuration on page 1 Third party configuration import C op5 Introduction Introduction Op5 Monitor has the capability to import the configuration from an nagios installation To do follow this manual basic knowledge in linux and nagios is necessary Pre requirements A running nagios 3 x installation and op5 Monitor Limitations There are some of limitations of the import script e The import script does not work with a nagios 1 or 2 installation Host and service history can not be imported but can be copied manually e Graph history can not be imported C op5 1 Third party configuration import Import configuration Import configuration
124. ps Business groups About business groups A business object is a group that can be populated with hosts and services from hosts and host groups It is also possible to add sub groups that can have their own rule set Creating a new group To create a new group go to Business Process in the left side menu Click on the New Object button at top right area New Object Select a rule for your business process group Business Process Groups Worst Best Simple state state At least Returt 2st state subeiements Fill in the name of the group Name Name for displaying in Business Processes Demo Group Enter the parameters of the rule if any OK threshold Count of OKs to remain OK 5 WARNING threshold Count of OKs to remain WARNING 3 Unit Unit for values above percentage or actual number num 4 Click on the Create button create Click on the Save icon E 136 1 Business Process C op5 Business groups Creating a sub element A sub element is either a service ofa host or another group with it s own rule set To add the sub element click add sub element icon in actions icons column Add a monitored object Select what type of object you what to add Monitor Objects 1 S Aw 7 Aw Service lt Service S Host ll Host SAI DAL group DAL Services Select which object by clicking in the empty text field and select you object from the drop down menu Service
125. r equal than the CRITICAL points then group is CRITICAL Examples Scores 4 3 num of OK OK WARNING CRITICAL gt WARNING e Scores 4 3 num of OK WARNING WARNING WARNING gt WARNING Scores 4 3 num of WARNING WARNING WARNING WARNING gt CRITICAL e Scores 4 3 num of OK OK CRITICAL CRITICAL gt CRITICAL Custom rules It is possible to create your own custom rules This is done in a script language called LUA See chapter custom rules not yet written 140 1 Business Process Business groups C op5 C op5 About notifications This chapter covers the following topics Notifications Subject Page Subsections Introduction 142 How does notifications 143 Notification filters on page 143 works Notification commands on page 143 Notification macros on page 144 Notification skins 146 The content of a notification skin on page 146 Creating custom notification skins on page 147 Dial up notification 149 Adding a dial up notification command on page 149 Configuring the contacts on page 150 SNMP trap notifications 151 Adding SNMP notification commands on page 151 Configuring the contacts on page 152 141 142 1 Notifications C op5 Introduction Introduction In this chapter we will take a deeper look at the notification function in op5 Monitor We will look at how the notification works notification skins works mail
126. r the controller i e the file that had the name of your widget Not all widgets had all of this but most of them had most of it lt php defined SYSPATH OR die No direct access allowed class My widget Widget extends widget Core public function construct 104 1 Widgets Widget Porting guide C op5 parent construct needed to figure out path to widget this set widget name CLASS basename FILE public function index arguments false S master false required to enable us to assign the correct variables to the calling controller Sthis gt master_obj S master fetch widget view path view path this view path view if is object arguments 0 current status arguments 0 array shift S arguments else current status new Current status Model if Scurrent_status gt data_present current status analyze status data widget id this swidgetname if isset Sarguments refresh interval Srefresh rate arguments refresh interval title this translate My Widget if isset arguments widget title title arguments widget title let view template know if wrapping div should be hidden or not ajax call request is ajax true false Actually do stuff C op5 1 Widgets 105 Widget Porting guide fetch widget content requi
127. re_once view_path if request is ajax output widget content echo json encode this output eise Sthis gt js array js my widget this css array css my widget call parent helper to assign all variables to master controller return S this fetch This is the new style equivalent php defined SYSPATH OR die No direct access allowed class My widget Widget extends widget Base public function construct model parent construct model Do any global initiation here public function index fetch widget view path view path this view path view current status this get current status Sarguments this get arguments Actually do stuff z this gt js array js my widget 106 1 Widgets Widget Porting guide C op5 Sthis gt css array css my widget require view path Note The widget must inherit from widget Base instead of widget Core Note The constructor now takes an argument index takes none Note You must not use require once to include the view if you intend to allow multiple widget instances Note Still no file endings on javascript and css resources Extra Settings This used to be a free form div in the view however it was mostly just cut n pasted from widget to widget so we have implemented the redundant stuff once so you won t have to
128. rl poller02 mkdir m 775 dir mon node ctrl poller02 chown monitor apache dir To make sure you have an empty configuration on poller01 mon node ctrl poller02 mon oconf hash This will give you an hash looking like this da 39 hash da39a3ee5e6b4b0d3255bfef95601890a d80709 Now push the configuration to the poller mon oconf push Restart and push the logs from master01 from poller01 mon restart sleep 3 mon oconf push Adding a new host group to a poller You might want to add an other host group for to a poller You need to edit the merlin conf file to do that This is not doable with any comand as it is today 1 Scalable Monitoring C op5 Distributed Monitoring To add new host group to a poller 1 Open up and edit opt monitor op5 merlin merlin conf 2 Adda new host group in the hostgroup line like this hostgroup gbg sth citrix servers Remember to not put any space between the hostgroup name and comma 3 Restart monitor on the poller mon restart 4 Send over the new configuration to the poller mon oconf push Removing a poller In this instruction we will remove a poller called poller01 The poller will be removed from the master configuration and all distributed configuration on the poller will also be removed To remove a poller 1 Login to the master over ssh as root 2 Deactivate and remove all distributed setup on the poller host mon node ctrl poller01 mon node remove master0
129. rvice To modify a service 1 Onthe start page choose the host you like to modify a service on in the drop down list Edit Host Filter by regular express Clear gbg fw1 1 Go 2 Click Go 3 Click Services for host Services for host gbg fw1 4 Choose the service you like to modify in the drop down list Filter by regular expres Clear Add new service Go Click Go In the view you will get only directives differ from the template will be shown To change the other directives click Advanced Advanced Make your modifications and click Apply changes Click Save Test this service Test this service makes it possible for you to test the service you added or modified before you save the new configuration and reload monitor This is a nice way to make sure the service works as it is supposed to In the guide below we will work with the service created in Adding a service on page 56 To test a service 1 Pick up the service you like to test as it is done in Modifying a service on page 57 2 Click Test this service at the bottom of the page Test this service 1 If more than one the shall be separated by a like this argone argtwo 58 1 op5 Monitor configuration tool C op5 Managing objects 3 Theoutput looks like the one below If you get any errors it will be shown Command usr bin asmonitor opt plugins check nt H 172 27 86 97 p 1248 v CPULOAD 160 90 95 Seen command one argument per line op
130. rvices cfg 5 Check a box to add a servicecheck with default values Some services require you to alter a few parameters notably those requiring authentication of some form If you don t check any boxes no services will be added windows 2008r2 2 172 27 86 105 172 27 86 105 l Select all NET amp PING WMI CPU Usage Memory Usage Page File Usage Disk Usage C Network Usage Red Hat VirtlO Ethernet Adapter 8 Press Finish Finish at the end of the page C op5 1 op5 Monitor configuration tool 63 Managing objects The host is added and you can save your configuration g You have unsaved configuration changes Please press SAVE to verify and activate Done adding new host Added 1 host Added 6 services windows 2008r2 2 TS Services for windows 2008r2 2 9 Press Save in the top right corner Il 10 And after the sanity check has been executed press Yes Save Changes There are 7 changes to 1 host objects and 6 service objects More info Are you sure you want to save your new configuration Yes save No am not done yet After you have pressed Yes save this information will be displayed g Preflight configuration check turned out ok Monitor has successfully loaded the new configuration Your configuration is saved and the host and its services are ready to be monitored HOST SERVICE ACTIONS LAST CHECK DURATION ATTEMPT STATUS INFORMATION rsa
131. rvices on Host groups ssssssssssseeeee eene nnne enne 41 Nested host groups aciei a idees HL eae due ce e DM dv aede 42 Service QlOUPS cq 42 GOMMACT Qro per iecositoctlenetdede toe citate Meet secured atras cba decd hae ntia eel tear 43 Permission to host and services ssssssseeeeneene nenne 43 USING templates eerisens erre eren or eie ener aee Ya Aaaa Fare eaire Yun w era EE av eer usos 45 How they WOFPKos ste Gospel de NR te ER pe D dup I a SeS CHE idola aTe 45 Managing ODJOCtS oc 46 Before you start is t ee admet e n tdt em er Rs 46 Add fiew etre eene dist eee t so Rus E ese fe coetu 46 Configuration files ssssssesseeeee E 46 Helper tetto Mf et adr Missa ties 47 Templates id tied idee t ania Ee esie ta eee eoo d nes 47 Contacts uc ee Re Re e RR a e RR Pe ete ERU EO E ences 47 Adding a contact template sssssssssssseeeee enne nens 47 Adding a contact 2 esee tdeo teet o to Abe lee tee lare etie bed 47 Modity a Contact tede a E tive ten Ri ED cet Send e tpe id 48 D lete a Contact c societe aite eet ieu eee lel 49 neris 49 Adding a host with new host wizard ssssse e 49 Adding hosts with network scan sssssseeeem emen 51 Modityirig a lioSt 22 1412 i Hen Mente Pas i apta pe Pap dcr as 52 Bolting a host eire UT EDO e c ia e enin p
132. s viewers authorized for all service commands admins authorized for all host commands admins C op5 1 LDAP authorization 157 Preparing your Active Directory etc httpd conf d op5ldapauth conf Location monitor old AuthzLDAPServer 172 27 86 97 AuthzLDAPUserBase ou op5 Operators dc webinar dc op5 AuthzLDAPGroupBase ou op5 Operators dc webinar dc op5 AuthzLDAPUserKey sAMAccountName AuthzLDAPBindDN op5auth webinar op5 AuthzLDAPBindPassword p4sswOrd require valid user AuthzLDAPUserScope subtree AuthType basic AuthzLDAPMethod ldap AuthName op5 Monitor Access lt Location gt Now the LDAP USERS variable in opt opSsys etc Idapserver controls where update users php will find users and the LDAP GROUP controls where the script will find the groups you have defined in opt op5sys etc Idaprights cfg So if I have LDAP GROUP ou op5 Operators dc webinar dc op5 LDAP USERS ou op5 Operators dc webinar dc op5 The script will only sync over users that exist under the op5 Operators OU belonging to any group defined opt op5sys etc Idaprights cfg under that OU so using the above example structure the cgi cfg will be populated like this authorized for system information opb5admin op5viewer authorized for configuration information opb5admin op5viewer authorized for system commands op5admin authorized for all services op5admin opb5viewer authorized for all hosts opb5admin opb5viewer authorized for
133. scripts that is used by the controllers The controller it self decides what file to use 112 1 GUI themes C op5 The files and folders File Folder js header php Description Locates and enables the files in js for the controllers A Do not touch this file kohana_unit_test php A Do not touch this file login php The user interface login page menu php Deprecated ninja_start php Deprecated template php The template file in it self This is the one that creates the main parts of the user interface unauthorized php A general unauthorized messages template C op5 1 GUlthemes 113 Make your own theme Make your own theme Before you start Before you can start making changes to the please make sure you have e ssh and sftp access to the op5 Monitor server created your own theme In all instructions in the rest of the chapter we assume you already have logged in via ssh on the op5 Monitor server We also assume that you have the basic knowledge needed in PHP and knows how to work in a Linux environment The theme we create here will be called my theme Creating your own theme To create your own theme 1 Goto the theme folder cd opt monitor op5 ninja application views themes 2 Copy the default theme to a new directory with the name of your new theme cp a default my theme Changing what theme op5 Monitor use To change what t
134. sy to use templates have been built in There are three types of templates to use hosttemplates service templates contact templates op5 Monitor comes with a couple of predefined templates for each object type described above They are just there to be examples and you should really create your own How they work Any directive set in a template will be used in the objects using the template But 1f you set a directive explicit on an object that value will override the templates Any directive not set in neither a template or directly on the object will have the op5 Monitor default value e Ifyou change any value on a directive in a template it will only be valid on the objects where the same directive is not set explicit 46 1 op5 Monitor configuration tool C op5 Managing objects Managing objects Now let us be a bit more hands on In this section we will take a look at how to add edit delete objects using the Configure There are sometimes many ways to do things in op5 Monitor but we will only show a few examples In the subsections to Managing objects we will assume that you start from the main page of Configure Configure This is the op5 Monitor Configuration tool the place where you add new hosts change notificatic handle contacts and so on Basically just about every configuration related setting is managed frc To get started select the prefered action below E New hosts ID Templates TA Hos
135. t Groups Service Groups a Contacts f Contact Groups 38 Commands 5 Profiles fi Time Periods Access Rights Admin roles I Network Autoscan E PNP Special Template a Export hosts to statistics g Edit Host Filter by regular expression Clear 172 27 86 97 Go Tip If you need help you can always click on the in the upper right corner you can also click each configurable variable Before you start Add new Every time you comes to a page where you can handle an object you will have the Add new dialog ready for you to add a new object Configuration files Every object is placed in a configuration file You may change what file the object is placed in at the bottom of every configuration page This is normally not necessary and only used in special cases C op5 1 op5 Monitor configuration tool 47 Help Managing objects In the guides we will only describe the directive that are differ from the default value Click the help icon Templates Because handling templates is the same for all kind of templates only the directives differ we will only add a template in Contacts on page 47 Contacts Adding a contact template Before we start to add any new contacts we will create a contact template to use with the contact in the next section In this guide we only describes the directive we will not use the default value in To add a contact template 1 Click Templates on the main page Templates
136. t or service links or click Save Added 1 host Added 6 services example host Services for example host Adding hosts with network scan Network ranges can be specified in a very free form Each of the four parts of the IP address may contain any combination of comma separated numbers from to ranges and single numbers as such 10 1 2 0 4 10 1 50 You can specify multiple ranges separated by spaces if you like To add hosts with network scan 1 Click New host on the main page New hosts 2 Click Network scan Network scan 1 All new services will inherit the Initial Service Settings If you choose not to enter a value for one or more required variable those variables must be set in the selected template 52 1 op5 Monitor configuration tool C op5 Managing objects 3 Fill in the desired network range We will scan for hosts in the range from 172 27 86 8 172 27 86 97 IP Range 172 27 86 8 97 Top Domainname Scan Ranges 4 Click Scan Ranges 5 In this case we found three hosts Scan completed in 16 seconds Found 3 responding hosts 6 Repeat To add a new host using the new host wizard Part 1 on page 49 for each host except for the last step If here 1s one or more host you do not like to add choose No in Add this host When you are finished click Scan hosts for services 7 Repeat To add a new host using the new host wizard Part 2 on page 50 for each host except for the last step
137. t plugins check nt H 172 27 86 97 CPULOAD 160 90 95 Plugin output CPU Load 1 60 min average 60 min avg Load 1 90 95 0 100 Plugin return code 0 here in the output 4 Click Test this service again to hide the output Deleting a service To delete a service 1 On the start page choose the host you like to delete a service from in the drop down list Edit Host Filter by regular expressior Clear gba fw1 1 Go 2 Click Go 3 Click Services for host Services for host gbg fw1 4 Choose the service you like to modify in the drop down list F ilt r expressior Clear Add new service Go 5 Click Delete Delete 6 Click Save Scanning host for network services When you added your host Hosts on page 49 you had the opportunity to add services found during the scan for network services This scan function can also be reached afterwords C op5 1 op5 Monitor configuration tool 59 Managing objects To scan a host for network services 1 Open up the host in Configure you like to add new services on 2 Click Scan host for network services 3 Select the new services found and click Continue to step 3 NSClient found in NSClient 0 3 6 481 2009 03 04 win gbg 2 192 168 1 8 Win Gbg 2 O Select all NET PING NSCLIENT M CPU Load M Disk usage D Disk usage E Continue to step 3 4 Click either the host or service link to go back to the place where you started 5 Click Sav
138. t that should be shown by default if no widget is set in the iframe The next one is username and this sets the user that should be allowed to fetch the widget When we set a user name here that user will no longer be able to login to op5 Monitor and will only be a widget user Example config widget name netw health config username jsmith This example the contact jsmith will be used to view widgets and by default it will show the network health widget External website setup On the external website you will need to add an iframe in which the widget is displayed The format of the iframe look like this iframe src http lt SERVER_NAME gt ninja index php external widget show widget OPTIONAL WIDGET NAME gt height 500px frameborder 0 width 600px scrolling no iframe C op5 1 Widgets 101 Access widgets externally In this iframe you will need to change the SERVER NAME gt to you op5 monitor host name and OPTIONAL WIDGET NAME gt can either be removed and the default widget will be used or you can specify a widget name to view another widget The widgets names can we found in the folder opt monitor op5 ninja application widgets The folder names is the same as the widget name 102 1 Widgets Widget Porting guide C op5 Widget Porting guide In op5 Monitor 5 6 the whole widget system is redeveloped to add more functionality such as multiple instances of a widget
139. t to include in the result Then you should add that host or hosts to the blacklist To add a host to the blacklist 1 Click Configure in the main menu C op5 1 op5 Monitor configuration tool 55 Managing objects 2 Click Network Autoscan Network Autoscan 3 Adda host IP address in the Host field Host blacklist Hosts List Host 192 168 1 2 Actions Add Remove 4 Click Add The result After the networks scan has been executed a small result will be shown in the upper left corner of the op5 Monitor GUI 3 unmonitored hosts present To add the hosts that has been found you only need to click on the text to the right of the icon You will then come to the Add new host wizard the same as when you have done a manual network scan Services Services can be added in a few different ways in Configure You may add a service by using addservice for this host e scan host for network services scan host for snmp interfaces e scan host for windows services with agent scan host for windows services using WMI We will take a look at the add service for this host In this guide we only describes the directive we will not use the default value in The default service template will used 56 1 op5 Monitor configuration tool C op5 Managing objects Adding a service To add a service using add service for this host 1 On the start page choose the host you like to add a new service to i
140. taining spaces in its name you will need to manually edit two files after accepting the new configuration 156 1 LDAP authorization Preparing your Active Directory C op5 Preparing your Active Directory Before configuring op5 Monitor we need to set up a user op5 Monitor can use to read authentication data from Active Directory and an Admin group for the op5 Monitor itself To prepare your Active Directory 1 3 Create a normal user op5viewer Create a global group for admin rights to op5 Monitor op5admin Add an AD user to the op5admins group Let us say that we have an AD structure that looks like this webinar op5 op5 Operators OU admins Group op5admin User member of admins viewers Group op5viewer User member of viewers Users Default AD Container kalle kula User member of admins Now make sure you have your configuration files like this opt op5sys etc ldapserver LDAP BASE dc webinar dc op5 LDAP BIND DN op5auth webinar op5 LDAP GROUP ou op5 Operators dc webinar dc op5 LDAP IS AD 1 LDAP SERVER 172 27 86 97 LDAP UPNSUFFIX webinar op5 LDAP USERKEY uid LDAP USERS ou op5 Operators dc webinar dc op5 opt op5sys etc ldaprights cfg authorized for system information admins viewers authorized for configuration information admins viewers authorized for system commands admins authorized for all services admins viewers authorized for all hosts admin
141. tart working in Configure Click Configure in the main menu Configure This will take you to the main menu of Configure Configure This is the op5 Monitor Configuration tool the place where you add new hosts change notification settin handle contacts and so on Basically just about every configuration related setting is managed from this To get started select the prefered action below 4 New hosts E Templates a Host Groups Service Groups Contacts Contact Groups E Commands 5 Profiles fi Time Periods Access Rights Admin roles I Network Autoscan PNP Special Template B Export hosts to statistics Edit Host Filter by regular expression Clear 172 27 86 97 Go Tip If you need help you can always click on the in the upper right corner you can also click on the or Click the Configure icon on any object in the monitoring part of op5 Monitor This will take you directly to the configuration part for the object you clicked on Applying changes When you have made any changes to an object you have to apply it to the Configure database 22 1 op5 Monitor configuration tool C op5 The basics Save the To apply the new configuration to the database Click Apply at the bottom of the page Apply Changes As soon as the data has been saved you will get the following warning telling you there is unsaved data in the Configure database g You have unsaved configuration changes Please press SAVE to
142. terfaces t8 Services for host iN Host C op5 1 op5 Monitor configuration tool 73 Make things easy 3 Click on Bulk delete objects Related items Scan host for network services Scan host for SNMP interfaces Scan host for Windows Services Select the services that you want to delete and click Delete Bulk delete services Note this feature could be dangerous If you delete an object that other objects depends on they will be deleted too You will not be warned You will be able to undo your changes the normal way though Delete the following services Select services ping Clear Available Selected ad PING 172 27 86 1 PING dist master01 support PING 172 27 86 34 PING dist poller01 support PING router1 PING support esx PING switch1 PING ar 5 And click Save applied changes 74 1 op5 Monitor configuration tool C op5 Time periods Time periods Add a time period Time periods is time defining objects that span over a week You can define included time for each day of the week in the time period definition You can also use already defined time periods as excludes add exceptions based on dates and ranges of days The time period objects are used at many places in the configuration Most noticeably are in the contact objects where the time periods defines when notifications should be sent out You can also use time periods to define when a servi
143. tes also KB MB GB and TB e c A continuous counter like bytes transmitted on an interface warn crit Can all be null and trailing unfilled semicolons min max can be dropped e min and max is not needed if UOM is 96 value warn crit min and max must be of the same UOM Example 2 Performance data output time 0 2189015 0 000000 size 42236B 0 The Example 2 on page 85 shows a performance data output from a plugin with two values separated with one space in the output Return code The return code is the one that op5 Monitor uses to determine what state the services is in It may be one of the following 0 1 2 3 All above 0 is to be known as problem states 86 1 Plugins The plugin interface C op5 Table2 The return codes in detail Nr Name Description 0 Ok The check did ok and everything seems to be working fine 1 Warning The plugin was able to check the service but it appeared to be above some warning threshold or did not appear to be working properly 2 Critical The plugin detected that either the service was not running or it was above some critical threshold 3 Unknown Something unknown happened during the check Things like invalid command line arguments or low level failures internal to the plugin shall not be reported as Unknown state C op5 1 Plugins 87 Adding your first plugin to op5 Monitor Adding your first plugin to op5 Mo
144. tives are required for a access rights object username e password The table below describes the required directives for the host object Directive Type Description username string The username is the id of the access rights and also used as login username password string The password is used for the login Access rights in detail The table below gives you a description of the settings of an access right object 32 1 op5 Monitor configuration tool C op5 Main objects Directive Description authorized for system inf Gives the user access to the system process ormation information authorized for configurat Gives the user access to view and change ion information configuration authorized for system com Gives the user access to issuing commands in mands the web gui With commands you can control certain functions in op5 Monitor for example enable disable notifications scheduled downtime acknowledge problems etc authorized for all servic Gives the user access to view all services se re Customizing views below for more information authorized for all hosts Gives the user access to view all hosts se Customizing views below for more information authorized for all servic Gives the user access to issue commands for all e commands services se Customizing views below for more information authorized for all host c Gives the user access to issue
145. to be able to produce graphs for you in op5 Monitor Status output The Status output is the text describing the result in readable words The plugin must print the status output to stdout when your plugin is executed 84 1 Plugins C op5 The plugin interface You will see it in the Status state information on the Service or Host information page HTTP OK HTTP 1 1 302 Found 502 bytes in 0 007 secon Status Information response time This text can be anything including HTML you like to use to describe the status situation for your plugin Performance data The performance data is data displaying the result in numbers The plugin must print the status output to stdout when your plugin is executed It is also used to produce performance graphs in op5 Monitor So if you want graphs from your plugin you need to have performance data in your output The performance data is setup like this label value UOM warn crit min max C op5 1 Plugins 85 The plugin interface Table Performance parts with descriptions Part Description label The label can contain any characters If space is included quotes are needed value The plugin was able to check the service but it appeared to be above some warning threshold or did not appear to be working properly UOM Can be any of nounit assuming an integer as a value S Seconds also us ms e percentage e B By
146. u are logged in to when your working in the user interface Then it could be a good idea to add the hostname to the Quick bar at the top of the user interface Updated 01 July 2010 11 36 54 i To add the hostname to the Quick bar 1 Make sure you have followed the instructions in Make your own theme on page 113 1 GUI themes 115 C op5 6 Making changes in the user interface Go to the folder of your theme cd opt monitor op5 ninja application views themes my theme Open up template php in your favorite text editor Look up the following lines starting on row 196 if you have not changed the default file div id quicklinks gt div Between the lines found in 4 add the following line br strong This host php echo SERVER SERVER NAME gt lt strong gt Save and exit from the editor Now it will look like this in the Quick bar This host 172 27 86 68 Updated 01 July 2010 11 57 18 i Change the default font Many visual parts in op5 Monitor are setup in css files There fore its a good idea to take a look at them and see how they are used In this example we will change the default font and make it a bit bigger To change the default font 1 Make sure you have followed the instructions in Make your own theme on page 113 Go to the folder of your theme cd opt monitor op5 ninja application views themes my theme Open up the css default common css file in your favorite text
147. u configure all the commands that should be available Adding a custom script plugin to NSClient command my_custom c mycustomdir my_ prog exe Or the simplified syntax my_custom c mycustomdir my_ prog exe 10 1 Agents NRPE NRPE C op5 NRPE is a Unix client for executing plugins on remote hosts It is distributed as rpm packages deb packages portable source code NRPE is used in combination with a set of local plugins By default in op5 Monitor the plugins are placed in opt plugins There are only a few plugins shipped with the op5 NRPE packages but you may use the ones located on the op5 Monitor server Installing NRPE To install NRPE 1 Download the package for your environment from the download section at the support site at www op5 com Put the package to the host you like to install it on Install the package the same way as you do normally with packages on that host Configuring NRPE Before we can start use the NRPE agent for monitoring with op5 Monitor we need to configure the agent The NRPE agent is located in etc nrpe conf C op5 1 Agents 11 NRPE Table2 NRPE main configuration file settings Setting Description server port The port NRPE should listen on Default 5666 allowed hosts Add the IP of you OP5 Monitor server on this line multiple addresses can be separated with ie allowed hosts 1 2 3 4 1 2 3 5 A Mak
148. use the left hand web menu to return to Configure or another part of op5 Monitor Using a Profile To use a profile 1 a Aa O N From the start page click Profiles Click use next to the profile Select what parts of the profile you want to include Fill in the number of copies and click Continue Fill out host details for the clones and click Create Cloning objects Cloning from an existing Host To clone a host Follow the instructions from in Creating a Profile on page 68 except do not click Save as Profile C op5 1 op5 Monitor configuration tool 69 Make things easy Cloning services If you want to create the same service check on multiple host first create the service check on the host then clone the service check to one or more hosts Itis also possible to clone multiple services to one or more hosts or hostgroups To clone a service to an other host 1 Choose the Configure web menu 2 Choose your host you want to copy from then click Go 3 Click Services for host in the RELATED ITEMS menu 4 Select the service or one of the services you want to clone then click on Go and then on Clone oa Select the service s you want to clone 6 You can chose to clone the service s to a list of hosts a hostgroup or all hosts in a hostgroup 7 Click Clone Copy objects There are a number of objects that can be copied in the configuration tool and make a exact copy of the object besi
149. ust be unique on a host but may be reused on other hosts check command max check attempts command object integer This is the short name of the command that is executed during service checks Is used to define the number of times op5 Monitor will retry checking the host if it returns any kind of problem state Setting this value to 1 will cause op5 Monitor alert directly without any retry check interval retry interval check period contacts integer integer time period contact The number of minutes between normal service checks The number of minutes between retry checks when a service has gone into a problem state before the state becomes hard During this period the service is checked It can be any time period defined in op5 Monitor Single contacts used to send notifications to and gives access to this host for users who do not have access to all hosts contact groups contact group Contact groups used to send notifications to and gives access to this host for users who do not have access to all hosts 1 op5 Monitor configuration tool 29 C op5 Main objects Contacts A contact is used for two purposes to send notifications to Directive Type Description notification interval integer Number of minutes between renotifications Set this to 0 if you only want to have one notification sent out notification period time per
150. ve any service notifications host notification options Down Used to set what type of host Unreachable notifications the contact shall Recovery receive Flapping start and stop Scheduled downtime start and stop service notification optio Critical Used to set what type of service im Warning notifications the contact shall Unknown receive Recovery Flapping start and stop Scheduled downtime start and stop host notification comma command The command used to send the nds object host notifications service notification com command The command used to send the mands object service notifications C op5 1 op5 Monitor configuration tool 31 Main objects Directive Type Description notification period time period During this period the notifications are sent out if any alerts are created It can be any time period defined in op5 Monitor Access rights Access rights is actually user accounts that makes it possible to login to the op5 Monitor GUI The access rights does not have any thing to do with notifications or the permissions of viewing objects in op5 Monitor Access rights can be connected to a contact by giving the username the same name as the id contact name of a contact A access right can also be created by checking the box Configure access rights for this contact when creating a contact Required directives The following direc
151. verify and activate Continue work until your work is done for this time changes When you have finished working and consider your new configuration is ready to be used by op5 monitor you need to save the changes in the Configure database to the configuration files This will also make op5 Monitor start using the new configuration To save the changes and reload op5 Monitor Click save icon at the top of the page E Before the configuration is saved to disk you have the opportunity to review the changes g You are about to save your configuration This will overwrite your current configuration so make sure you ve done everything right or Mon start Changes There are 2 changes to 1 host objects and 1 service objects More info Are you sure you want to save your new configuration Yes save No am not done yet To view what changes that will be written to disk click on More info If you are another users is doing changes on the same objects that you have access to you will save the other users changes as well The other users changes will be shown under More info as well In the screenshot below you will see an example where we created a new host group and jsmith at the same time added a new host C op5 1 op5 Monitor configuration tool 23 The basics Y Other users changes will be included in the save as well Be sure to review those changes below before saving Changes There are 3 changes t
152. very powerful Handle with care It has the power to both create and destroy your whole opS installation The commands To use the mon command just type mon The command should be used with one category and one sub category Only start stop and restart categories can be used without any sub category Start mon start This will start the op5 monitor process on the node that you run the command from Stop mon stop This will stop the op5 monitor process on the node you run the command from Restart mon restart This will restart the op5 monitor process on the node you run the command from Ascii Ninja mon ascii ninja 16 1 Scalable Monitoring C op5 The mon command Check This will display the ninja logo in ascii art Merlin mon ascii merlin This will display the merlin logo in ascii art Spool mon check spool maxage lt seconds gt warning X critical X path delete Checks a certain spool directory for files and files only that are older than maxage It s intended to prevent buildup of checkresult files and unprocessed performance data files in the various spool directories used by op5 Monitor delete Causes too old files to be removed maxage Is given in seconds and defaults to 300 5 minutes lt path gt May be perfdata or checks in which case directory names will be taken from op5 defaults warning and critical Have no effect if delete is
153. w the theme is built up and some minor changes that can easily be made C op5 1 GUI themes 111 The files and folders The files and folders An op5 Monitor theme includes a lot of folders and files Most of them are never a subject to be changed but you still need them All themes shall be placed in a folder of its own directly under opt monitor op5 ninja application views themes All views have their own folder named after the controller they belong to The view folders can contain everything from one single PHP file to a complex structure of folders code files PHP java script css images etc Almost all controllers have their corresponding view in the user interface Beside the view folders we have the following folders and files admin css css_header php error php icons js js header php kohana unit test php login php menu php ninja start php template php unauthorized php A more detailed description of the files listed above is shown in the table below File Folder Description admin For future functions in the user interface Not in use at the moment css CSS files that is used by the controllers The controller it self decides what file to use css header php Locates and enables the files in css for the controllers A Do not touch this file error php A general error messages template icons All icons used in the user interface js Java
154. where to send service and host notifications It can also be used to setup permissions about who should be able to see what object in the op5 Monitor GUI The members of a contact group associated with a certain host and or service are the one that will get all notifications for that object A Contact group can be populated with a contact or another contact group Permission to host and services If a user does not has the access rights to see all hosts that user need to have a contact connected to the contact group associated with the host or service the user should be able to see Show partial hostgroups If an unprivileged user is not a contact for all hosts in a hostgroup he will not be able to see the host group in the Hostgroup summary overview grid views To enable viewing of partial host group edit follow these steps logged in as root 1 Create and edit the file opt monitor op5 ninja application config custom groups php with your favorite editor 2 Putthe following into the file 44 1 op5 Monitor configuration tool C op5 Groups php defined SYSPATH OR die No direct access allowed config see partial hostgroups true 3 Savethe file C op5 1 op5 Monitor configuration tool 45 Using templates Using templates Even though Configure makes it easy for you to add and change the configuration of op5 Monitor it is still a lot of things to edit and tweak To make the software even more ea
155. widget editable movable collapsable removable closeconfirm id widget php echo widget id div class widget header span class php echo widget id editable id lt php echo widget id title gt lt php echo title gt lt span gt lt div gt div class widget editbox gt lt php echo form open ajax save widget setting array id gt widget id form onsubmit gt return false gt lt fieldset gt label for lt php echo widget id gt refresh php echo this translate Refresh sec gt lt label gt input size 3 type text name lt php echo widget id refresh id lt php echo widget id refresh value lt php echo refresh rate gt gt div id lt php echo widget id gt _slider gt lt div gt lt EXTRA CONTROLS HERE gt fieldset lt php echo form close gt div div class widget content gt lt php gt lt WIDGET CONTENT HERE gt lt php if ajax_call gt lt div gt lt div gt lt php gt With the new widget system you should remove everything from this file that isn t content That is the only thing you should keep in the view is what you had where it says lt WIDGET CONTENT HERE gt everything else should go Any extra controls will need to be migrated to the controller see Extra Settings on page 106 Controller This is the old template fo
156. with other hosts often representing real world network connections which is used in the network reachability logic Required directives The following directives are required for a host object e host_name alias address max_check_attempts check_period contacts contact_groups notification_interval notification period The table below describes the required directives for the host object Directive Type Description host name string This is the id of the object I may not contain any space in the value alias address string string A more describing name for the object The address the host is reached by preferably an IP address to make sure the host 1s reachable even if the DNS is down max check attempts integer Is used to define the number of times op5 Monitor will retry checking the host if it returns any kind of problem state Setting this value to 1 will cause op5 Monitor alert directly without any retry check period time period During this period the host is checked It can be any time period defined in op5 Monitor 1 op5 Monitor configuration tool 27 C op5 Main objects Directive contacts Type contact Description Single contacts used to send notifications to and gives access to this host for users who do not have access to all hosts contact groups contact group Contact groups used to se
157. xchange information directly as an alternative to the standard nagios way using NSCA Merlin functiona as backend for Ninja by adding support for storing the status information in a database fault tolearance and load balancing This means that Merlin now are responsible for providing status data and acts as a backend for the Ninja GUI Merlin components merlin mod merlin mod is responsible for jacking into the NEBCALLBAC calls and send them to a socket If the socket is not available the events are written to a backlog and sent when the socket is available again merlind The Merlin deamon listens to the socket that merlin mod writes to and sends all events received either to a database of your choise using libdbi or to another merlin daemon Ifthe daemon is unsuccessful in this it writes to a backlog and sends the data later merlin database This is a database that includes Nagios object status and status changes It also contains comments scheduled downtime etc Illustration This picture illustratates the components described above 14 1 Scalable Monitoring C op5 Merli rlin C op5 1 Scalable Monitoring 15 The mon command The mon command About The mon command is a very power command that comes with merlin It is this command that is used to setup a distributed or a load balanced environment This command can also be used to control the other op5 monitor servers The mon command is
Download Pdf Manuals
Related Search
Related Contents
Samsung MAX-C670 Инструкция по использованию PRIMERGY DIESEL 6000 E SILENCE Technoline Temperature Station SATISFAIT REMBOURSÉ Samsung DIGIMAX A7 Käyttöopas VP3000CRC (#7763) Copyright © All rights reserved.
Failed to retrieve file