Alerts/Scripts List Macros

The macros in the sample alerts_scripts_macros.cfg configuration file below are for listing Pikt alerts and scripts for use in piktc command lines.

///////////////////////////////////////////////////////////////////////////////
//
// alerts_scripts_macros.cfg -- alerts & scripts lists
//
///////////////////////////////////////////////////////////////////////////////
 
alerts
#ifndef pikttest
                RED
                EMERGENCY
                Every5Minutes
                Hourly

                SysAdminsUrgent
                CodersUrgent
                SysAdminsCritical
                CodersCritical
                SysAdminsWarning
                CodersWarning

                CodersNotice

                PiktAdminInfo
                Debug
#  if dbprimary
                CheckDB
#  endif
#elsedef
                RED=pikttest
                EMERGENCY=pikttest
                Every5Minutes=pikttest
                Hourly=pikttest

                SysAdminsUrgent=pikttest
                CodersUrgent=pikttest
                SysAdminsCritical=pikttest
                CodersCritical=pikttest
                SysAdminsWarning=pikttest
                CodersWarning=pikttest

                CodersNotice=pikttest
#endifdef

scripts
                DiskCap

                CheckDatabase

                DownSystems
                DownServers
                DownClients

                DownRpc
                DownRpcServers
                DownRpcClients

                SysReboots

                ScanDmesg
                ScanSyslogCritical
                ScanSyslogKernel

                ScriptChanges

                LoadAverages
                Processes
                Zombies
                RunawayCPUProcs
                RunawayMEMProcs
                CPUUsage
 
///////////////////////////////////////////////////////////////////////////////

You would invoke these scripts at the piktc command line, for example:

# piktc -ievbU +A =alerts -H down sick; piktc -ievbTU +A =alerts -H down sick

and:

# piktc -ivb +S =scripts -H down sick

Note how, by using the '-T' option in the second 'piktc -ievbTU +A =alerts -H down sick' command, this automatically activates the =pikttest built-in macro, which (might, but not necessarily) resolves to "Test".  So, for example, 'piktc -ievbU +A =alerts -H down sick' would install the alerts RED, EMERGENCY, and so on; while 'piktc -ievbTU +A =alerts -H down sick' would install REDTest, EMERGENCYTest, and so on.

Open Hand For more examples, see Samples.

 
Home | FAQ | News | Intro | Samples | Tutorial | Reference | Software
Developer's Notes | Licensing | Authors | Pikt-Users | Pikt-Workers | Related Projects | Site Index | Privacy Policy | Contact Us
Page best viewed at 1024x768 or greater.   Page last updated 2008-03-27.   This site is PIKT® powered.
PIKT® is a registered trademark of the University of Chicago.   Copyright © 1998-2008 Robert Osterlund. All rights reserved.
Home FAQ News Intro Samples Tutorial Reference Software
PIKT Logo
PIKT Page Title
View sample
service downage
Pikt script