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.
For more examples, see Samples.