Recipes for NCG

The following examples illustrate how NCG configuration options can be used. To simplify the descriptions below, default paths are used.

How do I configure just to see the SAM results for VOs supported by my site?

Edit the NCG::ConfigGen::Nagios section of /etc/ncg/ncg.conf to set PROBES_TYPE to remote. If you want to see all tests for all supported VOs then check that SAM_VOS parameter is missing or commented out in the NCG::RemoteMetrics::SAM section. If you want to explicitly select VOS then set SAM_VOS to a comma separated list of VO names as in the example below.

<NCG::ConfigGen>
  <Nagios>
    PROBES_TYPE=remote
..
  </Nagios>
</NCG::ConfigGen>
<NCG::RemoteMetrics>
  <SAM>
    # Uncomment the next line to select only 4 LHC VOs
    # SAM_VOS=Alice,Atlas,CMS,LHCb
..
  </SAM>
</NCG::RemoteMetrics>

VO names are case sensitive and can be checked from the SAM server by running the command
wget -O - http://lcg-sam.cern.ch:8080/same-pi/vo_names.jsp | xmllint --format -
from the Nagios server (or any box authorized for the SAM interface).

I only see critical SAM tests. How do I get all SAM tests run against my hosts?

The SAM_INCLUDE_ALL is used to select all SAM tests, not only critical ones.

At the top of your ncg.conf, make sure you've set

SAM_INCLUDE_ALL=1

And make sure that the NCG::RemoteMetrics and NCG::ConfigGen::Nagios blocks look something like:

<NCG::ConfigGen>
  <Nagios>
    SAM_INCLUDE_ALL=$SAM_INCLUDE_ALL
    SAM_VOS=$SAM_VOS
    SAM_ROOT_URL=$SAM_ROOT_URL
  </Nagios>
</NCG::ConfigGen>
<NCG::RemoteMetrics>
  <SAM>
    SAM_INCLUDE_ALL=$SAM_INCLUDE_ALL
    SAM_VOS=$SAM_VOS
    SAM_ROOT_URL=$SAM_ROOT_URL
  </SAM>

How to remove an unwanted service from a host in the output configuration?

Add a line of the format -
REMOVE_SERVICE!ce110.cern.ch!org.glite.LocalLogger
to the file /opt/lcg/etc/ncg/ncg.localdb changing the host (ce110.cern.ch) and service names (org.glite.LocalLogger) according to your needs. Note that the service name for Nagios in this context is the Nagios Service Group . Rerun ncg.pl and restart Nagios.

How do I configure to include hosts present only in BDII

Make sure that option ADD_HOSTS is set to 1 in block NCG::SiteInfo::LDAP:

<NCG::SiteInfo>
  <LDAP>
    LDAP_ADDRESS=$BDII
    ADD_HOSTS=1
  </LDAP>
  ...
</NCG::SiteInfo>

How do I remove a site from multisite configuration

Add a line of the format -
REMOVE_SITE!sitename
to the file /opt/lcg/etc/ncg/ncg.localdb. Rerun ncg.pl and restart Nagios.

How do I make specific configuration for a single site in multisite configuration

Add a new block which you want to modify for the site to file /etc/ncg/ncg.conf in the following format:

<NCG::BlockName sitename>
  <SubBlock>
  ...
  </SubBlock>
</NCG::BlockName>

How do I make Nagios send me alarms for Nagios internal checks

By default nagios will send these alarms on root@localhost email address. If you want to receive them on specific address set the variable NAGIOS_ADMIN in block NCG::ConfigGen::Nagios

<NCG::ConfigGen>
  <Nagios>
    NAGIOS_ADMIN=happy.nagios@admin.com
..
  </Nagios>
</NCG::ConfigGen>

How do I make Nagios send me alarms for all checks on the address published in GOCDB

By default nagios doesn't send alarms. If you want to switch them on set the variable ENABLE_NOTIFICATIONS to true in block NCG::ConfigGen::Nagios:

<NCG::ConfigGen>
  <Nagios>
    ENABLE_NOTIFICATIONS=true
..
  </Nagios>
</NCG::ConfigGen>

How do I make Nagios send me alarms for all checks to custom email address

Make sure that the variable ENABLE_NOTIFICATIONS in block NCG::ConfigGen::Nagios is set to true. Add a line of the format -
ADD_CONTACT!happy.nagios@admin.com
to the file /opt/lcg/etc/ncg/ncg.localdb. Rerun ncg.pl and restart Nagios.

Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r5 - 2009-09-15 - EmirImamagic
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    EGEE All webs login

This site is powered by the TWiki collaboration platform Powered by Perl This site is powered by the TWiki collaboration platformCopyright &© by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Ask a support question or Send feedback