Mur has asked for the wisdom of the Perl Monks concerning the following question:
I know there are all sorts of .INI file parsers, but what I need is a bit stronger. I envision the configuration looking something like the following:
Each alert would correspond to an external script that would measure something (say, load average), and return a single value. That value might be a number on a scale, or it might be a discrete value (like a string). The alert levels might be scaled so that "high" values are "redder", or it might be the other way around. Some alert levels might be undefined (as the "green" level is in ALERT3, above).ALERT1 green 0 - 20 yellow 21 - 40 red > 40 ALERT2 green IN ('a','b','c') yellow IN ('d','e') red OTHERWISE ALERT3 yellow < 12 red >= 12
What I'm hoping to find is a parser for a format like this. It's a long shot, but I figure it couldn't hurt to ask here. I poked around at CPAN for a bit, but I don't have a good "search" term that will filter out the various *.INI-type modules.
| -- | |||||||
|
| ||||||
| ...Nexcerpt...Connecting People With Expertise | |||||||
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: More than just a config file
by Elian (Parson) on Mar 05, 2003 at 19:33 UTC | |
|
Re: More than just a config file
by zengargoyle (Deacon) on Mar 05, 2003 at 20:01 UTC | |
|
Re: More than just a config file
by fruiture (Curate) on Mar 05, 2003 at 19:39 UTC | |
|
Re: More than just a config file
by perrin (Chancellor) on Mar 05, 2003 at 20:35 UTC | |
by Mur (Pilgrim) on Mar 05, 2003 at 21:27 UTC | |
by perrin (Chancellor) on Mar 05, 2003 at 21:38 UTC |