Presentation is loading. Please wait.

Presentation is loading. Please wait.

Custom Wizards, Components and Dashlets in Nagios XI Troy Lea

Similar presentations


Presentation on theme: "Custom Wizards, Components and Dashlets in Nagios XI Troy Lea"— Presentation transcript:

1 Custom Wizards, Components and Dashlets in Nagios XI Troy Lea

2 20122 About Me IT Consultant Strategic Group Cloud Computing Specialist VAULT One of Australia's most mature cloud computing solutions

3 20123 Why Why Nagios XI? Its a virtual appliance - ready to go Why customize? Improve functionality To help others / share the knowledge

4 20124 Configuration Wizards - Current Portfolio WizardDownloads Box293 Demonstration Wizard2,300+ Dell OpenManage46,000+ Dell UPS Monitoring Wizard42,000+ EMC CLARiiON Monitoring Wizard Available for adoption 78,000+ Group Creation Tool42,000+ Host Creation Tool115,000+ Plugin Tool40,000+ VMware ESX / vSphere / vCenter Monitoring Wizard70,000+

5 20125 Configuration Wizards - My Documentation Existing Documentation Created By Me Tips For Customising Configuration Wizards Documentation/Tips-For-Customising-Configuration-Wizards/details NOTE: Outdated Nagios XI Service Relationship Map Documentation/Nagios-XI-Service-Relationship-Map/details Box293 Demonstration Wizard Wizards/Box293-Demonstration-Wizard/details This is the wizard I will focus on in this presentation

6 20126 Nagios XI Service Relationship Map

7 20127 Configuration Wizards - Official Documentation Official Documentation Writing Custom Wizards For Nagios XI custom-wizards-for-nagios-xi Box293 Demonstration Wizard was derived from this documentation Nagios XI Component Development nagios-xi-component-development

8 20128 Configuration Wizards - Customizing Key Concepts Provide help / documentation at the start This can be in collapsible / expandable DIVs The more help you provide, the less road blocks there are Preserve existing data user has entered No-one likes re-populating multiple fields Automate the data collection process Where possible Good Example: Network Switch / Router wizard Bad Example: VMware ESX / vSphere / vCenter Monitoring Wizard (revamp planned)

9 20129 Configuration Wizards - Stages Step 1 This is the list of all the available wizards

10 Configuration Wizards - Stages Step 1 The information that is presented here is taken from the $args array defined at the beginning of the configuration wizard Information also used on the Manage Config Wizards page $args=array( CONFIGWIZARD_NAME => $name, CONFIGWIZARD_TYPE => CONFIGWIZARD_TYPE_MONITORING, CONFIGWIZARD_DESCRIPTION => 'This wizard is an example of how to code...', CONFIGWIZARD_DISPLAYTITLE => 'Box293 Demonstration Wizard', CONFIGWIZARD_FUNCTION => 'box293demo_configwizard_func', CONFIGWIZARD_PREVIEWIMAGE => 'screen2.png', CONFIGWIZARD_VERSION => ' ', CONFIGWIZARD_DATE => ' ', CONFIGWIZARD_AUTHOR => 'Troy Lea aka Box293', );

11 Configuration Wizards - Stages Before Step 2 Fresh Wizard Run? Define variables User is returning from Step 3? Check for existing Step 2 data and re-populate Step 2 Step 3 User provided data on Step 2 failed error checking? Check for Step 2 data and re-populate Step 2 Step 2 Validation

12 Configuration Wizards - Stages

13 Configuration Wizards - Stages Step 2 CONFIGWIZARD_MODE_GETSTAGE1HTML This is the first step you can customise Completely customisable except for the Back and Next buttons Put all of your overview, help and configuration steps here This will educate the end user about how the wizard works and also informs them of the requirements / pre-requisites You'll need to get the IP Address or FQDN of the host you want to monitor along with anything else you require

14 Configuration Wizards - Stages Between Step 2 and Step 3 CONFIGWIZARD_MODE_VALIDATESTAGE1DATA Is the user returning from Step 3? If so, no data validation required on Step 2 data Reality checks on Step 2 data If supplied data is not correct the wizard will go back to Step 2 Refer to the code in the Box293 Demonstration Wizard to see how the error checking is performed

15 Configuration Wizards - Stages

16 Configuration Wizards - Stages

17 Configuration Wizards - Stages Step 3 CONFIGWIZARD_MODE_GETSTAGE2HTML Completely customisable except for the Back and Next buttons You can use data gathered in Step 2 to query the device, manipulate the results and present them to the user Example: Network Switch/Router wizard Alternatively you may have pre-defined options Example: Dell OpenManage Wizard

18 Configuration Wizards - Stages User coming from Step 2? Check for Step 2 data and populate/manipulate Step 2 Step 3 User is returning from Step 4? Check for existing Step 3 data and re-populate Step 3 Step 4 User provided data on Step 3 failed error checking? Check for Step 3 user data and re-populate Step 3 Step 3 Validation

19 Configuration Wizards - Stages Between Step 3 and Step 4 CONFIGWIZARD_MODE_VALIDATESTAGE2DATA Is the user returning from Step 4? If so, no data validation required on Step 3 data Reality checks on Step 3 data If supplied data is not correct the wizard will go back to Step 3 Things like: Allowed characters Specific options selected but their sub-options are not defined Empty fields Refer to the code in the Box293 Demonstration Wizard to see how the error checking is performed

20 Configuration Wizards - Stages

21 Configuration Wizards - Stages Between Step 3 and Step 4 CONFIGWIZARD_MODE_GETSTAGE3OPTS Optional, does not need to exist Allows you to hide the Monitoring Settings in Step 4 This was ideal for the Plugin Tool

22 Configuration Wizards - Stages Step 4 CONFIGWIZARD_MODE_GETSTAGE3HTML Any additional html here will appear on the "Monitoring Settings" step, "Notification Settings" step, "Host Groups/Service Groups/Parent Host" step and the "Final" step Options for how often you want to monitor the device As per the previous slide these can be hidden This step will always be titled "Monitoring Settings"

23 Configuration Wizards - Stages Between Step 4 and Step 5 CONFIGWIZARD_MODE_VALIDATESTAGE3DATA Nothing you really need to put here unless you gathered more data in Step 4 If so don't forget to do reality checks on Step 4 data

24 Configuration Wizards - Stages

25 Configuration Wizards - Stages Between Step 4 and Step 5 CONFIGWIZARD_MODE_GETSTAGE4OPTS Optional, does not need to exist Allows you to hide the Notification Settings in Step 5 This was ideal for the Plugin Tool

26 Configuration Wizards - Stages Step 5 Options for Notification Settings As per the previous slide these can be hidden You CANNOT add additional code to this screen It will always be titled "Notification Settings"

27 Configuration Wizards - Stages Step 6 Options for Groups and Parents This Step CANNOT be modified This Step CANNOT be hidden

28 Configuration Wizards - Stages Final Step CONFIGWIZARD_MODE_GETFINALSTAGEHTML You can add additional code to this screen however it will always be titled "Final Settings"

29 Configuration Wizards - Stages Creating the Host and Service Objects CONFIGWIZARD_MODE_GETOBJECTS Using all the data you have gathered you "create" all the host and service objects and add them to an $objs array If you didn't do reality checks on the data then it's possible that an invalid configuration will be applied and fail

30 Configuration Wizards - Templates Adding a Command Definition You've supplied a plugin with your wizard Defining the command is done in a.cfg file referenced in the config.xml Other objects like Groups can also be defined Refer to official documentation about the config.xml file # 'check_dell_ups' command definition define command{ command_name check_dell_ups command_line $USER1$/check_dell_ups.pl -H $HOSTADDRESS$ -C $ARG1$ -T $ARG2$ $ARG3$ $ARG4$ $ARG5$ $ARG6$ $ARG7$ $ARG8$ }

31 Components - Current Portfolio ComponentDownloads History Tab37,000+

32 Components Official Documentation Nagios XI Component Development component-development

33 Dashlets and Dashboards - Overview Extract from the user guide: Dashboards are designed to provide individual users with customized information they find useful Dashboards are often used to display important, relevant information where it is needed most Dashboards are specific to individual Nagios XI users. Each user can create their own unique set of dashboards to customize Nagios XI to fit their needs Dashboards can be deployed to multiple users and can be kept synced with the original Dashlets are added to Dashboards

34 Dashboards Tab

35 Dashlets - Current Portfolio DashletDownloads Text Dashlet24,000+ Status Info Dashlet4,000+

36 Dashlets - Modes There are four parts to creating a Dashlet DASHLET_MODE_PREVIEW DASHLET_MODE_GETCONFIGHTML DASHLET_MODE_INBOARD DASHLET_MODE_OUTBOARD

37 Dashlets - Modes DASHLET_MODE_PREVIEW This is for when you click the Available Dashlets link

38 Dashlets - Modes DASHLET_MODE_GETCONFIGHTML When you click on the "Add This To A Dashboard" icon, DASHLET_MODE_GETCONFIGHTML is used

39 Dashlets - Modes DASHLET_MODE_GETCONFIGHTML Here you can specify the options you require for your dashlet There is no error checking when you click the Add It button

40 Dashlets - Modes In the Status Info Dashlet I implement my own error checking by providing a preview function Play around with the Status Info Dashlet to see how this can be achieved DASHLET_MODE_GETCONFIGHTML

41 Dashlets - Modes DASHLET_MODE_INBOARD This is the section that makes the dashlet appear on any dashboard you add it to

42 Dashlets - Modes DASHLET_MODE_OUTBOARD This is for some dashlets that are built into the pages of Nagios XI

43 Discount Offer But wait, there's more... Get a 10% discount on your Nagios XI Unlimited Nodes license when purchased through this link: Don't miss out as stocks are limited* *Stocks are not limited

44 Questions Questions ?


Download ppt "Custom Wizards, Components and Dashlets in Nagios XI Troy Lea"

Similar presentations


Ads by Google