Checking Netezza Databases

  • Upload
    srimkb

  • View
    249

  • Download
    1

Embed Size (px)

Citation preview

  • 7/26/2019 Checking Netezza Databases

    1/27

    Monitoring Netezza databasewith Nagios

    Frank Pantaleo

    [email protected]

  • 7/26/2019 Checking Netezza Databases

    2/27

    Introduction & Agenda

    A couple of !s

    "tate of monitoring Netezza

    Monitoring Netezza with Nagios Future direction

  • 7/26/2019 Checking Netezza Databases

    3/27

    A couple of !s # h$

    h$ are we monitoring Netezza % ow much ' does $our business lose when I( is down %

    ) million each $ear from I( downtime

    *artner +,--/ pegs the hourl$ cost of downtime for computernetworks at '0,1---

    A data center outage b$ itself can cost an a2erage of '13-- per

    minute

    4utages damage their reputation

    Now take this and bring it to a 5loud le2el # For e2er$ hour it isnot up and running1 Amazon.com takes a hit of almost ' million

    Allows $ou to be more proacti2e

    Allow upper management to plan for 67 growth+includes secondar$ e8ects e.g. 691 tape1 disk forbackup/

  • 7/26/2019 Checking Netezza Databases

    4/27

    A 5ouple of !s # hat

    hat are we looking for in a monitor % :ni2ersal monitoring

    ;/ Issue ;scalation +separate lists for warning1 high/

    6istributed Monitoring and "calabilit$ +higha2ailabilit$/

  • 7/26/2019 Checking Netezza Databases

    5/27

    A couple of !s # hat

    hat are we looking for in a monitor % +cont/ 9eporting +how man$ times was this ser2ice down %/

    ;?ternal Application Integration +5an I enable m$current applications to allow for earl$ issue

    noti=cation/ 4pen source solution

  • 7/26/2019 Checking Netezza Databases

    6/27

    "tate of Netezza monitoring

    Monitoring s$stems a2ailable forNetezza

    Netezza e2ent monitor comes stock with tool

    Netezza portal comes stock with tool

    5ommercial o8erings 7rightlight 5onsulting 4bser2ation6eck

  • 7/26/2019 Checking Netezza Databases

    7/27

    "tate of Netezza monitoring

    Netezza comes with 0 alertsAlerts actions ha2e limited responses

    ;mail

    "cript e?ecution

    In Bersion ).C can auto create support ticket 5on=guration can be done through NP" client or command line

    interface on Netezza ser2er

  • 7/26/2019 Checking Netezza Databases

    8/27

    "tate of Netezza monitoring

    ;?amples of Netezza ).C stock samplealerts

    6isk Full

    "P: Full

    ardware Failed

    ardware needs attention

    ardware restarted

    ardware ser2ice reDuested

    eat threshold e?ceeded

    istor$ capture e2ent

    istor$ load e2ent

    w2oltageFaultAuto

    NP"NoEonger4nline 9egenFault

    9unAwa$uer$

    No custom e2ents allowed

  • 7/26/2019 Checking Netezza Databases

    9/27

    "tate of Netezza monitoring

    Netezza Portal Face on glass monitoring

    5ustom Dueries can be added to the monitor

    All Dueries can be seen as numeric or graphic

    No alerting (ool can also be used for maintaining database

    obGects1 users1 e2ents1 and sessions

    If $ou are using E6AP1 portal can!t take ad2antage ofit. 4nce $ou login to portal though $ou will be using

    $our 67 usernameHpassword

  • 7/26/2019 Checking Netezza Databases

    10/27

    Netezza monitoring using Nagios

    hat are we monitoring in Netezza % (able Eocks b$ non#;6 statements during ;6

    batch c$cle

    :ser Dueries e?ceeding C hour +-J time poorl$formed Dueries/

    :ser Dueries during ;6 batch c$cle +depends on"EA/

    Age of backup older than "EA

    E6AP ser2er a2ailable for ""4

  • 7/26/2019 Checking Netezza Databases

    11/27

    Netezza monitoring using Nagios

    hat are we monitoring in Netezza % +cont/ "P: space unbalanced +generall$ a side e8ect of

    poor distribution/

    "tate of ;6 e.g. loading =les1 =le processing

    complete Eate arri2al of =les pre2enting the ;6 from meeting

    "EA!s

  • 7/26/2019 Checking Netezza Databases

    12/27

    Netezza monitoring using Nagios

    Architecture options with Nagios "ensors li2e on Nagios monitoring ser2er

    "ensors li2e on 6atabase ser2er and are controlledb$ N9P;. (his is what we went with based oncustomer securit$ rules.

    "cripting language is Perl. 9eall$ could be an$language that allows abilit$ to Duer$ the databaseand deal with responses. (here are other optionssuch as 7ash1 Ka2a1 P$thon1 and 5.

  • 7/26/2019 Checking Netezza Databases

    13/27

    Netezza monitoring using Nagios

    Architecture options with Nagios +cont/ Acti2e N9P; is a intermediar$ for running scripts

    and bringing results back to Nagios.

    Passi2e "NMP is an option but current pro2idedalerts need to be tied into a "NMP agent that reportsstatus. Netezza doesn!t raise "NMP alerts 447.

  • 7/26/2019 Checking Netezza Databases

    14/27

    Netezza monitoring using Nagios

    Passi2e alerts reDuire snmp trap software Nagios ser2er must be enabled to recei2e

    alerts httpLHHh$per#choi.blogspot.comH,-C,HC,Hnagios#snmp#tr

    ap#part#C#snmptt.html httpLHHh$per#choi.blogspot.comH,-CH-CHnagios#snmp#tra

    p#part#,#con=guration.html

    4nce Nagios is enabled Netezza e2ents mustbe changed to make Nagios aware there is aissue

    httpLHHnetezzaadmin.wordpress.comH,-CCHC-H-)Husing#netezzas#e2ent#manager#to#generate#snmp#traps

    http://hyper-choi.blogspot.com/2012/12/nagios-snmp-trap-part-1-snmptt.htmlhttp://hyper-choi.blogspot.com/2012/12/nagios-snmp-trap-part-1-snmptt.htmlhttp://hyper-choi.blogspot.com/2013/01/nagios-snmp-trap-part-2-configuration.htmlhttp://hyper-choi.blogspot.com/2013/01/nagios-snmp-trap-part-2-configuration.htmlhttp://netezzaadmin.wordpress.com/2011/10/07/using-netezzas-event-manager-to-generate-snmp-trapshttp://netezzaadmin.wordpress.com/2011/10/07/using-netezzas-event-manager-to-generate-snmp-trapshttp://netezzaadmin.wordpress.com/2011/10/07/using-netezzas-event-manager-to-generate-snmp-trapshttp://netezzaadmin.wordpress.com/2011/10/07/using-netezzas-event-manager-to-generate-snmp-trapshttp://hyper-choi.blogspot.com/2013/01/nagios-snmp-trap-part-2-configuration.htmlhttp://hyper-choi.blogspot.com/2013/01/nagios-snmp-trap-part-2-configuration.htmlhttp://hyper-choi.blogspot.com/2012/12/nagios-snmp-trap-part-1-snmptt.htmlhttp://hyper-choi.blogspot.com/2012/12/nagios-snmp-trap-part-1-snmptt.html
  • 7/26/2019 Checking Netezza Databases

    15/27

    Netezza monitoring using Nagios

    Passi2e alerts architecture

  • 7/26/2019 Checking Netezza Databases

    16/27

    Netezza monitoring using Nagios

    Acti2e alerts reDuire N9P; to be installed 5hecking is done using shell script and Perl

    Perl 67I 4675 6ownside is $ou ha2e to ha2e a e?posed userHpassword. In

    this case it was against I( polic$ so I stopped using this

    option. If we use this though all agents could li2e on Nagios ser2er

    Perl supplied package from Netezza 6ownside is this is eDui2alent of admin so $ou can do

    an$thing :pside is no usernameHpassword con=guration

    Agents must li2e on 6atabase ser2er

  • 7/26/2019 Checking Netezza Databases

    17/27

    Netezza monitoring using Nagios

    Acti2e Alert architecture

  • 7/26/2019 Checking Netezza Databases

    18/27

    Netezza monitoring using Nagios

    Acti2e Alert agent writing +interfacereDuirements/ M:"( set a return code e.g. - 4

    C A9NIN*

    , 59I(I5AE

    :NN4N

    Nagios dashboard displa$s associated te?t

    if +some logic here /print O4knOQ

    else

    print O;rror please look at table?$znOQ

  • 7/26/2019 Checking Netezza Databases

    19/27

    Netezza monitoring using Nagios

    Acti2e alerts # N9P; con=guration on Netezza ser2er

    If using the Perl package commands must run as nzuser so HetcHnagiosHnrpe.cfg must use the followingnrpeRuserSnz

    nrpeRgroupSnz

    4nce a sensor +perl script/ is written and tested itmust be added to nrpe.cfg =le.

    commandTcheckRnzRlongDr$USHe?portHhomeHnzHscriptsHcheckRnzRlongDr$.pl

    7est practice # 9eDuest HetcHnagiosHnrpe.cfg beopen to readHwrite from nz user

  • 7/26/2019 Checking Netezza Databases

    20/27

    Netezza monitoring using Nagios

    Acti2e alerts # ow does N9P; work on Nagiosser2er %

    de=ne commandV

    commandRname checkRnrpe

    commandRline ':";9C'HcheckRnrpe # '4"(A669;""' #c 'A9*C' #t --

    W

    de=ne ser2iceV

    use generic#ser2ice

    hostRname proddb

    ser2iceRdescription NX"E Eong Duer$ checkRcommand checkRnrpe>checkRnzRlongDr$>

    noti=cationsRenabled -

    W

  • 7/26/2019 Checking Netezza Databases

    21/27

    Netezza monitoring using Nagios

    Acti2e Alerts # Perl programming using "E.pmpackage In2ocation

    use lib OHnzHkitHshareHperlOQ

    use nzLL"EQ

    Package can onl$ be used b$ the nz owner N4 username & password

    m$ +'I(6I91 '6A(A6I9/Q

    '6A(A6I9 S OHnzHdata.C.-OQ

    'I(6I9 S OHnzHkitOQ

    nzLL"ELLcon=g+I(6I9 SY 'I(6I91 6A(A6I9 SY '6A(A6I9/Q

    7est practice # use alarm timers around "E statements and$ 2ariables after each "E e?ecution 'Dresp#YVnrowsW1

    ncols1 colid1 Dt$peQ

  • 7/26/2019 Checking Netezza Databases

    22/27

    Netezza monitoring using Nagios

    Perl programming using "E.pm package+continued/ Interface e?ample Z nzLL"ELLDuer$+'dbname1 'sDl/. :nlike 67I

    the database must be called out e2er$ time $ou Duer$.

    9esultsets are not acti2e in database +unlike 67I/ the$ are in perl

    memor$ 9esultset tra2ersal is done using perl foreach e.g.

    foreach m$ 'row +@V'Dresp#YVdataWW/ V

    +'blockerRusername1'blockerRsDl1'blockeeRusername1'blockeeRsDl/ S @'rowQ

    7est practiceL If $ou can a2oid dealing with resultset and deal onl$with counts

    e.g +nrows/. Most e

  • 7/26/2019 Checking Netezza Databases

    23/27

    Future direction

    6ata graphing ;?pand areas that we are monitoring for in

    Netezza

    Integrate into a product o8ering +4bser2ation

    6eck/ from 7rightlight that collects NXI"( forcustomer

    Predict when we are going to outgrow our currentprocessing and database needs

  • 7/26/2019 Checking Netezza Databases

    24/27

    5onclusion

    e$ takeawa$s are :sing Nagios can help $our compan$ ha2e an e?tensible

    e2ent monitor. :nderstanding Nagios architecture isimportant to a stable and working monitoring setup. 4nce$ou understand architecture setup writing an agent is

    tri2ial. If $ou can write "E to detect an e2ent then $oucan write an agent.

    4ther 9eading materials or learning de2ices on thissubGect that $ou would like to share :9E!s pro2ided in document ha2e the recipe for how to

    setup Nagios1 "NMP traps1 and Netezza. Please 2isit thosesites to get that info.

  • 7/26/2019 Checking Netezza Databases

    25/27

    uestions%

    An$ Duestions%

    (hanks>

  • 7/26/2019 Checking Netezza Databases

    26/27

    9eference

    httpLHHwww.thegeekstu8.comH,-C-H-[Hmonitoring#software#criteriaH

    httpLHHe?change.nagios.orgHdirector$H(utorialsHInstall#and#

    5on=gure#N9P;#in#5ent4"#and#9ed#atHdetails

    httpLHHwww#-C.ibm.comHsupportHknowledgecenterH"":E6R).C.-Hcom.ibm.nz.portal.docHcRportalRwelcome.html

    httpLHHwww.networkworld.comHarticleH,,[))Hinfrastructure#managementHhow#to#Duantif$#downtime.html

  • 7/26/2019 Checking Netezza Databases

    27/27

    (he ;ndFrank Pantaleo

    [email protected]