SlideShare a Scribd company logo
Automating Windows Application Testing
                and
    Problem Resolution With Nagios


              Sam Lansing
Introduction

   What I do at Nagios
          Member of the Technical Support team at Nagios.
          I work on documentation and quality assurance,
             implementation of automated problem solutions into the
             Nagios family of software.
   Example projects:
          AutoIT Timer Plugin, Program Timer, Host Service Restart
            Event Handler, Selenium integration, and Selenium Nagios
            XI interface checks.




                                 2012                                  2
What is this automation thing?

   Automation, the asset
          Eliminates the hassle of terminal usage when an issue
             occurs
          Precise and efficient testing
          Less 3 o'clock AM calls




                                    2012                          3
As far as the eye can see!

   Possibilities and limitations
         ➢   Autonomous problem solutions
         ➢   Usable for simple things such as service restarting, to
               intricate expansive uses such as mass distribution
         ➢   Main limitation is user interface interference
         ➢   Advisable to cron scripts as to not over lap actions




                                     2012                              4
Solutions, what works?

   AutoIT and Selenium
        ➢   Currently tested and implemented with maximum capability
        ➢   Large user base and support team
        ➢   Easily molded to your needs
   Triggered Scripts
        ➢   Event Handler driven
        ➢   Simple yet effective
        ➢   Easily Editable




                                   2012                                5
Event Handlers, what are they?

   Triggered when a Host or Service changes state
        ➢   Restarting a service
        ➢   Entering helpdesk tickets
        ➢   Logging database information
   Intermediary between Nagios and a remote host
        ➢   Can be used to run a script “if state is”
        ➢   Most efficient way to tie in AutoIT scripts otherwise the
             automation scripts may overlap, or continue running.




                                     2012                               6
Event Handler example

   Using XI Windows Monitoring Wizards
        ➢   A monitored service goes into a critical state and the
              servicerestart.sh script is triggered
        ➢   Servicerestart.sh sends a command directly to the Windows
              Host to net stop/start “service name”
        ➢   On the next check the service is determined to be running
             and the check returns to an OK state




                                    2012                                7
AutoIT What is it?

   AutoIT is actually has numerous parts
        ➢   AutoIt Recorder: Will record mouse gestures, and keyboard
              use and output as AutoIt script
        ➢   SciTE Editor: The provided program with which to create and
              edit AutoIt scripts
        ➢   Aut2Exe: A converter which may be used to create
              executable files from AutoIt scripts
        ➢   AutoItX: DLL and COM control, allowing you to add AutoIt
              features to your favorite scripting language.




                                  2012                                    8
AutoIT Purpose

   Originally designed to configure massive amounts of PCs, and has
   over time become a very powerful scripting language supporting
   complex expressions, loops, user functions, and just about everything
   in between.
        ➢   Easy to learn syntax
        ➢   Manipulation of processes and windows
        ➢   Use standard windows controls
        ➢   Creation of GUIs
        ➢   Unicode support
        ➢   Works with Windows User Account Control and much more




                                   2012                                    9
AutoIT Purpose Cont.

   Small and stand-alone, no registry entries or .dll's required which
   makes it easy to use on servers.
   Scripts can be compiled into stand-alone executables for security
   reasons.
   AutoIT is now fully Unicode aware and supports both 32, and 64-bit
   versions for it's main components.
   AutoIT gives you full window support, windows are referenced by title,
   text, size, position, class, and internal Win32 API handles.




                                   2012                                     10
The Rule of the Automated Monitoring Road


   Maintain control


   Automation is great but use caution when over automating


   You could end up making more work for yourself cleaning up




                                 2012                           11
Integration With Nagios




          2012            12
Check Page Load Time

   Checks the complete time a web page takes to load from the firefox
   browser.
   Sends the data via NRPE through NSClient++ to Nagios
   Nagios outputs the data on the XI web UI in a clear format




                                  2012                                  13
Check Page Load Time




            Example video of AutoIT Recorder




                        2012                   14
Check Page Load Time




                       2012   15
The Good, The Batch, And The Ugly

   When the cron comes up for Nagios XI to run this check a remote
   batch file is executed.




                                 2012                                16
Check Page Load Time

   AutoIT script in the SCITE editor.




                                   2012   17
Check Page Load Time

   AutoIT script cont.




                         2012   18
Check Page Load Time

   AutoIT script cont.




                         2012   19
Check Page Load Time

   The Batch file dumps text from the notepad created file to Nagios
   The Nagios Server receives this as a long text string
   The string is converted into a friendly readable format




                                   2012                                20
Check Page Load Time

   Check Program Load Time




   AutoIT Timer Plugin Exchange Page
   Integrating autoIT With Nagios Documentation




                                2012              21
Windows Service Restart Event Handler




                2012                    22
Event Handlers, what are they?

   Triggered when a Host or Service changes state
        ➢   Restarting a service
        ➢   Entering helpdesk tickets
        ➢   Logging database information
   Intermediary between Nagios and a remote host
        ➢   Can be used to run a script “if state is”
        ➢   Most efficient way to tie in AutoIT scripts otherwise the
             automation scripts may overlap, or continue running.




                                     2012                               23
Service Restart Event Handler

   The Nagios Service is checking the existence of a running Windows
   Service
   The Service goes down and Nagios see's this on its routine check
   The Service was set up with a event handler to restart the Service
   and it is triggered
   The Windows Service is restarted and Nagios switches the Service
   back to an Ok status




                                  2012                                  24
Service Restart Event Handler

   Yes...another batch file.
   Simple yet effective, you don't want to get your hands tied if
   something goes wrong.
   Injects a Administrator provided argument from Nagios instead of
   being hard coded due to security reasons.




                                   2012                               25
Service Restart Event Handler

   Sending the command via NRPE from the Nagios Terminal
   Providing a argument for the Service we desire to be restarted
   The nice thing about the simplicity of the batch file is it only does two
   things
   It stops the Service if it is running, if not it starts the Service, a simple
   on and off switch




                                      2012                                         26
Service Restart Event Handler

   Example of the Event Handler script
   Since the check only looks at two things “If the service is up or if it is
   down” We will only trigger this if it is in a Critical or Downed State




                                     2012                                       27
Possible uses for Event Handler driven AutoIT
                   scripts

 Using check_windowsupdates to check for new updates. When a
 certain value is met, say... 5 security updates, the event handler is
 triggered which starts an AutoIT script to update Windows
 Cron Windows to run a system defrag, then when it has been run an
 event handler triggers a script to open a performance graphing
 program to see the difference so it is ready for you Monday morning
 when you walk in with your coffee
 Since AutoIT is not available for Linux distributions, you could use a
 terminal running on Windows to send commands to a Linux system,
 if, say NRPE goes down and you want to tail a log after you restart it




                                 2012                                     28
Service Restart Event Handler

   Host Service Restart Event Handler


   Event Handler Exchange Page


   Service Restart Event Handler Documentation (Windows)
   Service Restart Event Handler Documentation (Linux) - Alex Griffin




                                  2012                                  29
Using Selenium for Web Based Testing and
              Resolutions




                 2012                      30
Selenium

  Selenium automates browsers. What you do with that power is
  entirely up to you. Primarily it is for automating web applications for
  testing purposes, but is certainly not limited to just that. Boring web-
  based administration tasks can also be automated as well.
  Selenium has the support of some of the largest browser vendors
  who have taken (or are taking) steps to make Selenium a native part
  of their browser. It is also the core technology in countless other
  browser automation tools, APIs and frameworks.
  Support for over 10 different language packs such as Java, C#, Ruby,
  Python, and Perl.
  Selenium also includes an easy to use web recorder, with the ability
  to edit the script as you go.




                                   2012                                      31
Selenium

  The four core Selenium Projects:
       ➢   Selenium IDE: Firefox add-on for recording and playback of
             tests in Firefox 2+, also able to generate code to run tests
             with the RC
       ➢   Selenium Remote Control (RC): Server system for controlling
             browsers locally or remotely including almost every
             programming language and framework for testing
       ➢   WebDriver: Natively drive browsers remotely or locally
       ➢   Grid: Mass deployment of Selenium tests across multiple
             servers




                                   2012                                     32
Check_Selenium

  Check_selenium is a Nagios friendly check designed to pass
  selenium Perl scripts through to a remote system. In this way you can
  control web based automation and testing through Selenium via
  Nagios. The checks return all performance data in a way readable by
  Nagios Core, and Nagios XI.
  Examples are in Perl




                                 2012                                     33
Check_Selenium
  Example of Selenium IDE, User friendly, loads of under the hood
  options




                                2012                                34
Check_Selenium

  This check periodically opens a remote Firefox browser and performs
  a functionality check of the Nagios.com website
  It runs through each of the drop down menu items to make sure none
  of those link are broken




                                2012                                    35
Check_Selenium

  Results of our test on the Nagios Terminal, Selenium RC reports
  each test live on separate lines so you can see an issue as it occurs.




                                  2012                                     36
Check_Selenium

  Output on the Nagios XI Web UI in a short, friendly manner




  Output on the Nagios Terminal




                                  2012                         37
Check_Selenium


           Selenium Example Video




                   2012             38
Check_Selenium

  Error from example video




                             2012   39
Check_Selenium

  Perl Selenium check




  Selenium Integration Document


  Perl check_selenium Exchange Page




                              2012    40
Other Options?

   Besides the programs and methods shown here, what other options
   do I have?
   WinAutomation by Softmotive, Ltd.
        ➢   Has the added benefit of everything combined into one UI, it
              does offer you more control over intricate things like mouse
              movement coordinates
        ➢   Clean, clear UI with images to assist you in seeing what your
              script is actually doing
        ➢   Combines the effectiveness of Selenium, AutoIT and Event
              Handlers into one, but is difficult to incorporate with Nagios
              because of this “togetherness”




                                    2012                                       41
Other Options Cont.

   Automate by Network Automation, Inc
        ➢   Interactive drag and drop work flow design much in the same
               fashion as WinAutomation
        ➢   Has a tight non scripting attitude about their software, which
              could be good or bad.
        ➢   Both of these solutions would be good local problem solvers
              to a Windows environment as you can trigger localized
              Event Handlers based on the software and a set of events.




                                    2012                                     42
Thank you!




  2012       43

More Related Content

PPTX
Windows 8 Introduction
PDF
A Scalable Software Build Accelerator
PPTX
Devops interview questions 2 www.bigclasses.com
PPTX
Build it, Test it, Ship it: Continuous Delivery at Turner Broadcasting System...
PDF
Top DevOps tools
PDF
Hudson_WhitePaper
PPS
10 gui 14
PDF
Agile Bodensee - Testautomation & Continuous Delivery Workshop
Windows 8 Introduction
A Scalable Software Build Accelerator
Devops interview questions 2 www.bigclasses.com
Build it, Test it, Ship it: Continuous Delivery at Turner Broadcasting System...
Top DevOps tools
Hudson_WhitePaper
10 gui 14
Agile Bodensee - Testautomation & Continuous Delivery Workshop

What's hot (20)

PPTX
Devops interview questions 1 www.bigclasses.com
PPTX
Top devops solution providers
PDF
Silk4net Tcm6 174178
PDF
Red Hat Enterprise Linux 8 Workshop
PDF
Dev ops and safety critical systems
PDF
Devops interview-questions-PDF
PPT
Where and When to Docker
PPTX
Enhance your Agility with DevOps
PPTX
SDLC Using Docker for Fun and Profit
PDF
Packaging tool options
PDF
Deploy Application Files with Git
PDF
Distributed Docker Pipeline Architecture with CloudBees Jenkins Enterprise
PPTX
Codecamp 2020 microservices made easy workshop
PDF
Salesforce development lifecycle
PDF
Journey toward3rdplatform
PPTX
Docker - A Quick Introduction Guide
PDF
Gonzo - Increasing Agility by Understanding Risk
PDF
Salesforce CLI
PDF
Cimande 2.0 Quick Start english version
PPTX
02 - Build and Deployment Management
Devops interview questions 1 www.bigclasses.com
Top devops solution providers
Silk4net Tcm6 174178
Red Hat Enterprise Linux 8 Workshop
Dev ops and safety critical systems
Devops interview-questions-PDF
Where and When to Docker
Enhance your Agility with DevOps
SDLC Using Docker for Fun and Profit
Packaging tool options
Deploy Application Files with Git
Distributed Docker Pipeline Architecture with CloudBees Jenkins Enterprise
Codecamp 2020 microservices made easy workshop
Salesforce development lifecycle
Journey toward3rdplatform
Docker - A Quick Introduction Guide
Gonzo - Increasing Agility by Understanding Risk
Salesforce CLI
Cimande 2.0 Quick Start english version
02 - Build and Deployment Management
Ad

Viewers also liked (11)

PPT
Lets Auto It
PDF
Automation Testing with Sikuli
PDF
PPTX
Software Automation Testing Introduction
PPTX
Web testing automation
PPTX
Smarter ways to do selenium automation @ work, Selenium, automation
PPTX
Using AutoIt for Millennium Task Automation
PDF
Practical Sikuli: using screenshots for GUI automation and testing
DOCX
Selenium interview questions
PPT
Java Basics for selenium
DOCX
AUtoIT_Masters Project
Lets Auto It
Automation Testing with Sikuli
Software Automation Testing Introduction
Web testing automation
Smarter ways to do selenium automation @ work, Selenium, automation
Using AutoIt for Millennium Task Automation
Practical Sikuli: using screenshots for GUI automation and testing
Selenium interview questions
Java Basics for selenium
AUtoIT_Masters Project
Ad

Similar to Nagios Conference 2012 - Sam Lansing - Automating Windows Application Testing and Problem Resolution With Nagios (20)

PPTX
Nagios Conference 2012 - Nathan Vonnahme - Monitoring the User Experience
PPT
Eclipse summit-2010
PDF
The Twelve Factor App
PDF
Transform Digital Business with DevOps
ODP
Nagios Conference 2012 - Todd Groten - Monitoring Call of Duty: Elite
PDF
MuleSoft Surat Virtual Meetup#16 - Anypoint Deployment Option, API and Operat...
PPT
E G Innovations Vdi Monitoring
ODP
IBM Lotusphere 2011 AD306 - IBM Lotus Sametime Proxy: A Collaborative Recipe...
PDF
Novell SecureLogin 7 and Your Microsoft Active Directory Setup
PPTX
Ultimate Guide to Microservice Architecture on Kubernetes
PPTX
Dockerizing react app
PPTX
InfrastructureDevOps.pptx it is most sui
PDF
Twelve factor apps
PDF
Preparing for Neo - Singapore OutSystems User Group October 2022 Meetup
PPTX
Android ppt
PDF
Software Delivery in 2016 - A Continuous Delivery Approach
PDF
Webinar on deployment automation Xebialabs - 15 sept 2010
PPTX
Building 12 factor apps with ASP.NET Core, Сергій Калинець
PDF
Continuous integration (eng)
PDF
How to build a Java Web App in the Cloud
Nagios Conference 2012 - Nathan Vonnahme - Monitoring the User Experience
Eclipse summit-2010
The Twelve Factor App
Transform Digital Business with DevOps
Nagios Conference 2012 - Todd Groten - Monitoring Call of Duty: Elite
MuleSoft Surat Virtual Meetup#16 - Anypoint Deployment Option, API and Operat...
E G Innovations Vdi Monitoring
IBM Lotusphere 2011 AD306 - IBM Lotus Sametime Proxy: A Collaborative Recipe...
Novell SecureLogin 7 and Your Microsoft Active Directory Setup
Ultimate Guide to Microservice Architecture on Kubernetes
Dockerizing react app
InfrastructureDevOps.pptx it is most sui
Twelve factor apps
Preparing for Neo - Singapore OutSystems User Group October 2022 Meetup
Android ppt
Software Delivery in 2016 - A Continuous Delivery Approach
Webinar on deployment automation Xebialabs - 15 sept 2010
Building 12 factor apps with ASP.NET Core, Сергій Калинець
Continuous integration (eng)
How to build a Java Web App in the Cloud

More from Nagios (20)

PPTX
Nagios XI Best Practices
PDF
Jesse Olson - Nagios Log Server Architecture Overview
PDF
Trevor McDonald - Nagios XI Under The Hood
PDF
Sean Falzon - Nagios - Resilient Notifications
PDF
Marcus Rochelle - Landis+Gyr - Monitoring with Nagios Enterprise Edition
PDF
Janice Singh - Writing Custom Nagios Plugins
PDF
Dave Williams - Nagios Log Server - Practical Experience
PDF
Mike Weber - Nagios and Group Deployment of Service Checks
PDF
Mike Guthrie - Revamping Your 10 Year Old Nagios Installation
PDF
Bryan Heden - Agile Networks - Using Nagios XI as the platform for Monitoring...
PDF
Matt Bruzek - Monitoring Your Public Cloud With Nagios
PDF
Lee Myers - What To Do When Nagios Notification Don't Meet Your Needs.
PDF
Eric Loyd - Fractal Nagios
PDF
Marcelo Perazolo, Lead Software Architect, IBM Corporation - Monitoring a Pow...
PDF
Thomas Schmainda - Tracking Boeing Satellites With Nagios - Nagios World Conf...
PPTX
Nagios World Conference 2015 - Scott Wilkerson Opening
PDF
Nrpe - Nagios Remote Plugin Executor. NRPE plugin for Nagios Core
PDF
Nagios Log Server - Features
PDF
Nagios Network Analyzer - Features
PPTX
Nagios Conference 2014 - Dorance Martinez Cortes - Customizing Nagios
Nagios XI Best Practices
Jesse Olson - Nagios Log Server Architecture Overview
Trevor McDonald - Nagios XI Under The Hood
Sean Falzon - Nagios - Resilient Notifications
Marcus Rochelle - Landis+Gyr - Monitoring with Nagios Enterprise Edition
Janice Singh - Writing Custom Nagios Plugins
Dave Williams - Nagios Log Server - Practical Experience
Mike Weber - Nagios and Group Deployment of Service Checks
Mike Guthrie - Revamping Your 10 Year Old Nagios Installation
Bryan Heden - Agile Networks - Using Nagios XI as the platform for Monitoring...
Matt Bruzek - Monitoring Your Public Cloud With Nagios
Lee Myers - What To Do When Nagios Notification Don't Meet Your Needs.
Eric Loyd - Fractal Nagios
Marcelo Perazolo, Lead Software Architect, IBM Corporation - Monitoring a Pow...
Thomas Schmainda - Tracking Boeing Satellites With Nagios - Nagios World Conf...
Nagios World Conference 2015 - Scott Wilkerson Opening
Nrpe - Nagios Remote Plugin Executor. NRPE plugin for Nagios Core
Nagios Log Server - Features
Nagios Network Analyzer - Features
Nagios Conference 2014 - Dorance Martinez Cortes - Customizing Nagios

Recently uploaded (20)

PPTX
Spectroscopy.pptx food analysis technology
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Machine learning based COVID-19 study performance prediction
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
A comparative analysis of optical character recognition models for extracting...
PPTX
Big Data Technologies - Introduction.pptx
PPTX
MYSQL Presentation for SQL database connectivity
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Electronic commerce courselecture one. Pdf
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PPTX
Cloud computing and distributed systems.
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
MIND Revenue Release Quarter 2 2025 Press Release
DOCX
The AUB Centre for AI in Media Proposal.docx
Spectroscopy.pptx food analysis technology
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
“AI and Expert System Decision Support & Business Intelligence Systems”
Machine learning based COVID-19 study performance prediction
Per capita expenditure prediction using model stacking based on satellite ima...
A comparative analysis of optical character recognition models for extracting...
Big Data Technologies - Introduction.pptx
MYSQL Presentation for SQL database connectivity
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
sap open course for s4hana steps from ECC to s4
Electronic commerce courselecture one. Pdf
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Assigned Numbers - 2025 - Bluetooth® Document
Mobile App Security Testing_ A Comprehensive Guide.pdf
NewMind AI Weekly Chronicles - August'25-Week II
Cloud computing and distributed systems.
Chapter 3 Spatial Domain Image Processing.pdf
Network Security Unit 5.pdf for BCA BBA.
MIND Revenue Release Quarter 2 2025 Press Release
The AUB Centre for AI in Media Proposal.docx

Nagios Conference 2012 - Sam Lansing - Automating Windows Application Testing and Problem Resolution With Nagios

  • 1. Automating Windows Application Testing and Problem Resolution With Nagios Sam Lansing
  • 2. Introduction What I do at Nagios Member of the Technical Support team at Nagios. I work on documentation and quality assurance, implementation of automated problem solutions into the Nagios family of software. Example projects: AutoIT Timer Plugin, Program Timer, Host Service Restart Event Handler, Selenium integration, and Selenium Nagios XI interface checks. 2012 2
  • 3. What is this automation thing? Automation, the asset Eliminates the hassle of terminal usage when an issue occurs Precise and efficient testing Less 3 o'clock AM calls 2012 3
  • 4. As far as the eye can see! Possibilities and limitations ➢ Autonomous problem solutions ➢ Usable for simple things such as service restarting, to intricate expansive uses such as mass distribution ➢ Main limitation is user interface interference ➢ Advisable to cron scripts as to not over lap actions 2012 4
  • 5. Solutions, what works? AutoIT and Selenium ➢ Currently tested and implemented with maximum capability ➢ Large user base and support team ➢ Easily molded to your needs Triggered Scripts ➢ Event Handler driven ➢ Simple yet effective ➢ Easily Editable 2012 5
  • 6. Event Handlers, what are they? Triggered when a Host or Service changes state ➢ Restarting a service ➢ Entering helpdesk tickets ➢ Logging database information Intermediary between Nagios and a remote host ➢ Can be used to run a script “if state is” ➢ Most efficient way to tie in AutoIT scripts otherwise the automation scripts may overlap, or continue running. 2012 6
  • 7. Event Handler example Using XI Windows Monitoring Wizards ➢ A monitored service goes into a critical state and the servicerestart.sh script is triggered ➢ Servicerestart.sh sends a command directly to the Windows Host to net stop/start “service name” ➢ On the next check the service is determined to be running and the check returns to an OK state 2012 7
  • 8. AutoIT What is it? AutoIT is actually has numerous parts ➢ AutoIt Recorder: Will record mouse gestures, and keyboard use and output as AutoIt script ➢ SciTE Editor: The provided program with which to create and edit AutoIt scripts ➢ Aut2Exe: A converter which may be used to create executable files from AutoIt scripts ➢ AutoItX: DLL and COM control, allowing you to add AutoIt features to your favorite scripting language. 2012 8
  • 9. AutoIT Purpose Originally designed to configure massive amounts of PCs, and has over time become a very powerful scripting language supporting complex expressions, loops, user functions, and just about everything in between. ➢ Easy to learn syntax ➢ Manipulation of processes and windows ➢ Use standard windows controls ➢ Creation of GUIs ➢ Unicode support ➢ Works with Windows User Account Control and much more 2012 9
  • 10. AutoIT Purpose Cont. Small and stand-alone, no registry entries or .dll's required which makes it easy to use on servers. Scripts can be compiled into stand-alone executables for security reasons. AutoIT is now fully Unicode aware and supports both 32, and 64-bit versions for it's main components. AutoIT gives you full window support, windows are referenced by title, text, size, position, class, and internal Win32 API handles. 2012 10
  • 11. The Rule of the Automated Monitoring Road Maintain control Automation is great but use caution when over automating You could end up making more work for yourself cleaning up 2012 11
  • 13. Check Page Load Time Checks the complete time a web page takes to load from the firefox browser. Sends the data via NRPE through NSClient++ to Nagios Nagios outputs the data on the XI web UI in a clear format 2012 13
  • 14. Check Page Load Time Example video of AutoIT Recorder 2012 14
  • 15. Check Page Load Time 2012 15
  • 16. The Good, The Batch, And The Ugly When the cron comes up for Nagios XI to run this check a remote batch file is executed. 2012 16
  • 17. Check Page Load Time AutoIT script in the SCITE editor. 2012 17
  • 18. Check Page Load Time AutoIT script cont. 2012 18
  • 19. Check Page Load Time AutoIT script cont. 2012 19
  • 20. Check Page Load Time The Batch file dumps text from the notepad created file to Nagios The Nagios Server receives this as a long text string The string is converted into a friendly readable format 2012 20
  • 21. Check Page Load Time Check Program Load Time AutoIT Timer Plugin Exchange Page Integrating autoIT With Nagios Documentation 2012 21
  • 22. Windows Service Restart Event Handler 2012 22
  • 23. Event Handlers, what are they? Triggered when a Host or Service changes state ➢ Restarting a service ➢ Entering helpdesk tickets ➢ Logging database information Intermediary between Nagios and a remote host ➢ Can be used to run a script “if state is” ➢ Most efficient way to tie in AutoIT scripts otherwise the automation scripts may overlap, or continue running. 2012 23
  • 24. Service Restart Event Handler The Nagios Service is checking the existence of a running Windows Service The Service goes down and Nagios see's this on its routine check The Service was set up with a event handler to restart the Service and it is triggered The Windows Service is restarted and Nagios switches the Service back to an Ok status 2012 24
  • 25. Service Restart Event Handler Yes...another batch file. Simple yet effective, you don't want to get your hands tied if something goes wrong. Injects a Administrator provided argument from Nagios instead of being hard coded due to security reasons. 2012 25
  • 26. Service Restart Event Handler Sending the command via NRPE from the Nagios Terminal Providing a argument for the Service we desire to be restarted The nice thing about the simplicity of the batch file is it only does two things It stops the Service if it is running, if not it starts the Service, a simple on and off switch 2012 26
  • 27. Service Restart Event Handler Example of the Event Handler script Since the check only looks at two things “If the service is up or if it is down” We will only trigger this if it is in a Critical or Downed State 2012 27
  • 28. Possible uses for Event Handler driven AutoIT scripts Using check_windowsupdates to check for new updates. When a certain value is met, say... 5 security updates, the event handler is triggered which starts an AutoIT script to update Windows Cron Windows to run a system defrag, then when it has been run an event handler triggers a script to open a performance graphing program to see the difference so it is ready for you Monday morning when you walk in with your coffee Since AutoIT is not available for Linux distributions, you could use a terminal running on Windows to send commands to a Linux system, if, say NRPE goes down and you want to tail a log after you restart it 2012 28
  • 29. Service Restart Event Handler Host Service Restart Event Handler Event Handler Exchange Page Service Restart Event Handler Documentation (Windows) Service Restart Event Handler Documentation (Linux) - Alex Griffin 2012 29
  • 30. Using Selenium for Web Based Testing and Resolutions 2012 30
  • 31. Selenium Selenium automates browsers. What you do with that power is entirely up to you. Primarily it is for automating web applications for testing purposes, but is certainly not limited to just that. Boring web- based administration tasks can also be automated as well. Selenium has the support of some of the largest browser vendors who have taken (or are taking) steps to make Selenium a native part of their browser. It is also the core technology in countless other browser automation tools, APIs and frameworks. Support for over 10 different language packs such as Java, C#, Ruby, Python, and Perl. Selenium also includes an easy to use web recorder, with the ability to edit the script as you go. 2012 31
  • 32. Selenium The four core Selenium Projects: ➢ Selenium IDE: Firefox add-on for recording and playback of tests in Firefox 2+, also able to generate code to run tests with the RC ➢ Selenium Remote Control (RC): Server system for controlling browsers locally or remotely including almost every programming language and framework for testing ➢ WebDriver: Natively drive browsers remotely or locally ➢ Grid: Mass deployment of Selenium tests across multiple servers 2012 32
  • 33. Check_Selenium Check_selenium is a Nagios friendly check designed to pass selenium Perl scripts through to a remote system. In this way you can control web based automation and testing through Selenium via Nagios. The checks return all performance data in a way readable by Nagios Core, and Nagios XI. Examples are in Perl 2012 33
  • 34. Check_Selenium Example of Selenium IDE, User friendly, loads of under the hood options 2012 34
  • 35. Check_Selenium This check periodically opens a remote Firefox browser and performs a functionality check of the Nagios.com website It runs through each of the drop down menu items to make sure none of those link are broken 2012 35
  • 36. Check_Selenium Results of our test on the Nagios Terminal, Selenium RC reports each test live on separate lines so you can see an issue as it occurs. 2012 36
  • 37. Check_Selenium Output on the Nagios XI Web UI in a short, friendly manner Output on the Nagios Terminal 2012 37
  • 38. Check_Selenium Selenium Example Video 2012 38
  • 39. Check_Selenium Error from example video 2012 39
  • 40. Check_Selenium Perl Selenium check Selenium Integration Document Perl check_selenium Exchange Page 2012 40
  • 41. Other Options? Besides the programs and methods shown here, what other options do I have? WinAutomation by Softmotive, Ltd. ➢ Has the added benefit of everything combined into one UI, it does offer you more control over intricate things like mouse movement coordinates ➢ Clean, clear UI with images to assist you in seeing what your script is actually doing ➢ Combines the effectiveness of Selenium, AutoIT and Event Handlers into one, but is difficult to incorporate with Nagios because of this “togetherness” 2012 41
  • 42. Other Options Cont. Automate by Network Automation, Inc ➢ Interactive drag and drop work flow design much in the same fashion as WinAutomation ➢ Has a tight non scripting attitude about their software, which could be good or bad. ➢ Both of these solutions would be good local problem solvers to a Windows environment as you can trigger localized Event Handlers based on the software and a set of events. 2012 42
  • 43. Thank you! 2012 43