Giter Site home page Giter Site logo

check_veritas_alerts_parser's Introduction

check_veritas_alerts_parser.py

Checks a generated XML from Veritas NetBackup Appliance for statuses and such...

Requirements:

  • Requires modifying the locked down NetBackup Appliance to generate and copy out an XML file.
  • Does not require Icinga2 on the appliance or otherwise modifying it.
  • Will copy out using SCP, easily done with a pub key to a special user account on the icinga server, thus you dont comprimise anything inbound to the Appliance or on the server that checks the generated alerts.xml.

Configuring the NetBackup appliance

First, log in to the appliance via SSH

  1. Log in as admin via ssh
  2. Support
  3. Support> Maintenance
  4. su -

SSH keys setup

  1. Generate a SSH key pair (ssh-keygen)
  2. Copy the contents of the .pub key to your designated user account on the host that will run the script. (.ssh/authorized_keys - supports multiple entries for different key pairs, handy if multiple servers)
  3. Try to ssh using the following format: ssh @ from the appliance to verify it can connect to it over SSH.

Crontab - assuming run every 10 minutes

  1. crontab -e
  2. 3-59/10 * * * * su - -c 'perl /opt/autosupport/legacy/scripts/hwmon/monitoring.pl --dontdisplay --cron'
  3. 4-59/10 * * * * scp /tmp/alerts.xml <remote SSH login>@<remote host>:<filename>
  • I recommend using the filename nb-appliance01.example.com-alerts.xml for a clear indiciation of its source.

Checks available

Appliance

  • epoch -- Alerts timestamp, is the file we are parsing new enough?
  • disks
  • fans
  • fibrechannels
  • msdps
  • partitions
  • powers
  • raidgroups
  • temperatures

Enclosure

  • disks
  • fans
  • powers
  • temperatures

Icinga2 CheckCommand definition

object CheckCommand "veritas_alerts_parser" {
    import "plugin-check-command"
    command = [ PluginDir + "/check_veritas_alerts_parser.py" ]
    timeout = 10s
    arguments += {
        "--appliance-check" = {
            description = "Check to execute"
            value = "$veritas_appliance_check$"
        }
        "--critical" = "$veritas_critical$"
        "--enclosure-check" = {
            description = "Enclosure check to execute"
            value = "$veritas_enclosure_check$"
        }
        "--warning" = "$veritas_warning$"
        "--xmlfile" = {
            description = "Full path to the XML file containing the Veritas XML file"
            required = true
            value = "$veritas_filepath$"
        }
    }
}

check_veritas_alerts_parser's People

Contributors

theflyingcorpse avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.