hobbit-*.cfg syntax check
list Gary B.
I searched through my archives of email on this mailing list, and couldn't find an answer to my question... Is there a syntax checker for the hobbit-*.cfg configuration files (such as hobbit-clients.cfg)? I'm having an issue where some of the rules I set up are apparently being ignored, or otherwise not working as expected. I have a feeling it may be due to a syntax error, but I'm not sure. If there isn't already a way to check the syntax of these files, I think it would be a great feature to add. Similar to the named-checkconf scripts that are available for BIND. I'm also curious, how does Hobbit deal with syntax errors in the configuration files? Does it just skip over bad syntax, or stop completely when it encounters an error?
list Henrik Størner
▸
On Fri, Aug 04, 2006 at 10:40:12AM -0400, Gary B. wrote:
Is there a syntax checker for the hobbit-*.cfg configuration files (such as hobbit-clients.cfg)? I'm having an issue where some of the rules I set up are apparently being ignored, or otherwise not working as expected. I have a feeling it may be due to a syntax error, but I'm not sure.
The utilities that read the configuration file does complain if they find something they cannot understand. Look in the clientdata.log and page.log files (for hobbit-clients.cfg and hobbit-alerts.cfg, respectively). There are also "--dump-config" options for these two utilities, which will dump the configuration as they understand it. And complain about any errors.
▸
I'm also curious, how does Hobbit deal with syntax errors in the configuration files? Does it just skip over bad syntax, or stop completely when it encounters an error?
It tries to cope, ignoring the error and continuing with whatever bits of the config file it understands. Regards, Henrik
list Kent Brodie
Speaking of config files--- the "STOP" keyword in hobbit-alerts.cfg does not appear to be recognized, even though it's referenced in the documentation?!?!?!? Kent C. Brodie - user-da7f7d5174c0@xymon.invalid Department of Physiology Medical College of Wisconsin (XXX) XXX-XXXX
▸
-----Original Message-----
From: Henrik Stoerner [mailto:user-ce4a2c883f75@xymon.invalid]
Sent: Friday, August 04, 2006 10:09 AM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] hobbit-*.cfg syntax check
On Fri, Aug 04, 2006 at 10:40:12AM -0400, Gary B. wrote:Is there a syntax checker for the hobbit-*.cfg configuration files (such as hobbit-clients.cfg)? I'm having an issue where some of the rules I set up are apparently being ignored, or otherwise not working as expected. I have a feeling it may be due to a syntax error, but I'm not sure.
The utilities that read the configuration file does complain if they find something they cannot understand. Look in the clientdata.log and page.log files (for hobbit-clients.cfg and hobbit-alerts.cfg, respectively). There are also "--dump-config" options for these two utilities, which will dump the configuration as they understand it. And complain about any errors.
I'm also curious, how does Hobbit deal with syntax errors in the configuration files? Does it just skip over bad syntax, or stop completely when it encounters an error?
It tries to cope, ignoring the error and continuing with whatever bits of the config file it understands. Regards, Henrik
list Jerry Yu
just a thought, what about using a dir named 'client_config' holding individual config file for each client, a default file, plus some wild-card hosts as well. The benefit is obvious, the error in the syntax would not be so devastating, since it affects on one client at a time unless it is default file or wild-card config gets screwed. Yesterday, I managed to delete 8 hosts entries on the top of the hobbit-clients.cfg, and "HOST= of the 9th host entry. This caused checks for the 9th host entry got applied to all thre remaining 24 hosts, as if they are part of the default section (I have one at the bottom).
▸
On 8/4/06, Henrik Stoerner <user-ce4a2c883f75@xymon.invalid> wrote:On Fri, Aug 04, 2006 at 10:40:12AM -0400, Gary B. wrote:Is there a syntax checker for the hobbit-*.cfg configuration files (such as hobbit-clients.cfg)? I'm having an issue where some of the rules I set up are apparently being ignored, or otherwise not working as expected. I have a feeling it may be due to a syntax error, but I'm not sure.The utilities that read the configuration file does complain if they find something they cannot understand. Look in the clientdata.log and page.log files (for hobbit-clients.cfg and hobbit-alerts.cfg, respectively). There are also "--dump-config" options for these two utilities, which will dump the configuration as they understand it. And complain about any errors.I'm also curious, how does Hobbit deal with syntax errors in the configuration files? Does it just skip over bad syntax, or stop completely when it encounters an error?It tries to cope, ignoring the error and continuing with whatever bits of the config file it understands. Regards, Henrik
list Gary B.
That might get a little annoying if you have a large number of hosts to monitor, though. However, perhaps adding the ability to breakup a config such as hobbit-clients into multiple files could help.
▸
just a thought, what about using a dir named 'client_config' holding individual config file for each client, a default file, plus some wild-card hosts as well. The benefit is obvious, the error in the syntax would not be so devastating, since it affects on one client at a time unless it is default file or wild-card config gets screwed. Yesterday, I managed to delete 8 hosts entries on the top of the hobbit-clients.cfg, and "HOST= of the 9th host entry. This caused checks for the 9th host entry got applied to all thre remaining 24 hosts, as if they are part of the default section (I have one at the bottom). On 8/4/06, Henrik Stoerner <user-ce4a2c883f75@xymon.invalid> wrote:On Fri, Aug 04, 2006 at 10:40:12AM -0400, Gary B. wrote:Is there a syntax checker for the hobbit-*.cfg configuration files (such as hobbit-clients.cfg)? I'm having an issue where some of the rules I set up are apparently being ignored, or otherwise not working as expected. I have a feeling it may be due to a syntax error, but I'm not sure.The utilities that read the configuration file does complain if they find something they cannot understand. Look in the clientdata.log and page.log files (for hobbit-clients.cfg and hobbit-alerts.cfg, respectively). There are also "--dump-config" options for these two utilities, which will dump the configuration as they understand it. And complain about any errors.I'm also curious, how does Hobbit deal with syntax errors in the configuration files? Does it just skip over bad syntax, or stop completely when it encounters an error?It tries to cope, ignoring the error and continuing with whatever bits of the config file it understands. Regards, Henrik
list Jerry Yu
why would it be annoying? To custom a client, you either insert a section to the hobbit-clients.cfg, or put such an insertion into a file named clientName.cfg under such a directory dedicated for client conf. The latter is less error-prone and less adverse impact when syntax error and inadvertent deletion/editing happens. I'd assume this is easier for the server code to parse as well.
▸
On 8/4/06, Gary B. <user-33b796116d5f@xymon.invalid> wrote:That might get a little annoying if you have a large number of hosts to monitor, though. However, perhaps adding the ability to breakup a config such as hobbit-clients into multiple files could help.just a thought, what about using a dir named 'client_config' holding individual config file for each client, a default file, plus some wild-card hosts as well. The benefit is obvious, the error in the syntax would not be so devastating, since it affects on one client at a time unless it is default file or wild-card config gets screwed. Yesterday, I managed to delete 8 hosts entries on the top of the hobbit-clients.cfg, and "HOST= of the 9th host entry. This caused checks for the 9th host entry got applied to all thre remaining 24 hosts, as if they are part of the default section (I have one at the bottom). On 8/4/06, Henrik Stoerner <user-ce4a2c883f75@xymon.invalid> wrote:On Fri, Aug 04, 2006 at 10:40:12AM -0400, Gary B. wrote:Is there a syntax checker for the hobbit-*.cfg configuration files (such as hobbit-clients.cfg)? I'm having an issue where some of the rules I set up are apparently being ignored, or otherwise not working as expected. I have a feeling it may be due to a syntax error, but I'm not sure.The utilities that read the configuration file does complain if they find something they cannot understand. Look in the clientdata.log and page.log files (for hobbit-clients.cfg and hobbit-alerts.cfg, respectively). There are also "--dump-config" options for these two utilities, which will dump the configuration as they understand it. And complain about any errors.I'm also curious, how does Hobbit deal with syntax errors in the configuration files? Does it just skip over bad syntax, or stop completely when it encounters an error?It tries to cope, ignoring the error and continuing with whatever bits of the config file it understands. Regards, Henrik
list Gary B.
Oh, you meant in addition to the current way host tests are added.
▸
why would it be annoying? To custom a client, you either insert a section to the hobbit-clients.cfg, or put such an insertion into a file named clientName.cfg under such a directory dedicated for client conf. The latter is less error-prone and less adverse impact when syntax error and inadvertent deletion/editing happens. I'd assume this is easier for the server code to parse as well. On 8/4/06, Gary B. <user-33b796116d5f@xymon.invalid> wrote:That might get a little annoying if you have a large number of hosts to monitor, though. However, perhaps adding the ability to breakup a config such as hobbit-clients into multiple files could help.just a thought, what about using a dir named 'client_config' holding individual config file for each client, a default file, plus some wild-card hosts as well. The benefit is obvious, the error in the syntax would not be so devastating, since it affects on one client at a time unless it is default file or wild-card config gets screwed. Yesterday, I managed to delete 8 hosts entries on the top of the hobbit-clients.cfg, and "HOST= of the 9th host entry. This caused checks for the 9th host entry got applied to all thre remaining 24 hosts, as if they are part of the default section (I have one at the bottom). On 8/4/06, Henrik Stoerner < user-ce4a2c883f75@xymon.invalid> wrote:On Fri, Aug 04, 2006 at 10:40:12AM -0400, Gary B. wrote:Is there a syntax checker for the hobbit-*.cfg configuration files (such as hobbit-clients.cfg)? I'm having an issue where some of the rules I set up are apparently being ignored, or otherwise not working as expected. I have a feeling it may be due to a syntax error, but I'm not sure.The utilities that read the configuration file does complain if they find something they cannot understand. Look in the clientdata.log and page.log files (for hobbit-clients.cfg and hobbit-alerts.cfg, respectively). There are also "--dump-config" options for these two utilities, which will dump the configuration as they understand it. And complain about any errors.I'm also curious, how does Hobbit deal with syntax errors in the configuration files? Does it just skip over bad syntax, or stop completely when it encounters an error?It tries to cope, ignoring the error and continuing with whatever bits of the config file it understands. Regards, Henrik
list Jerry Yu
eh, not addition, replacement/alternate way.
▸
On 8/4/06, Gary B. <user-33b796116d5f@xymon.invalid> wrote:Oh, you meant in addition to the current way host tests are added.why would it be annoying? To custom a client, you either insert a section to the hobbit-clients.cfg, or put such an insertion into a file named clientName.cfg under such a directory dedicated for client conf. The latter is less error-prone and less adverse impact when syntax error and inadvertent deletion/editing happens. I'd assume this is easier for the server code to parse as well. On 8/4/06, Gary B. <user-33b796116d5f@xymon.invalid> wrote:That might get a little annoying if you have a large number of hosts to monitor, though. However, perhaps adding the ability to breakup a config such as hobbit-clients into multiple files could help.just a thought, what about using a dir named 'client_config' holding individual config file for each client, a default file, plus some wild-card hosts as well. The benefit is obvious, the error in the syntax would not be so devastating, since it affects on one client at a time unless it is default file or wild-card config gets screwed. Yesterday, I managed to delete 8 hosts entries on the top of the hobbit-clients.cfg, and "HOST= of the 9th host entry. This caused checks for the 9th host entry got applied to all thre remaining 24 hosts, as if they are part of the default section (I have one at the bottom). On 8/4/06, Henrik Stoerner < user-ce4a2c883f75@xymon.invalid> wrote:On Fri, Aug 04, 2006 at 10:40:12AM -0400, Gary B. wrote:Is there a syntax checker for the hobbit-*.cfg configuration files (such as hobbit-clients.cfg)? I'm having an issue where some of the rules I set up are apparently being ignored, or otherwise not working as expected. I have a feeling it may be due to a syntax error, but I'm not sure.The utilities that read the configuration file does complain if they find something they cannot understand. Look in the clientdata.log and page.log files (for hobbit-clients.cfg and hobbit-alerts.cfg, respectively). There are also "--dump-config" options for these two utilities, which will dump the configuration as they understand it. And complain about any errors.I'm also curious, how does Hobbit deal with syntax errors in the configuration files? Does it just skip over bad syntax, or stop completely when it encounters an error?It tries to cope, ignoring the error and continuing with whatever bits of the config file it understands. Regards, Henrik
list Henrik Størner
▸
On Fri, Aug 04, 2006 at 10:18:07AM -0500, Brodie, Kent wrote:
Speaking of config files--- the "STOP" keyword in hobbit-alerts.cfg does not appear to be recognized, even though it's referenced in the documentation?!?!?!?
Could you show me an example where it is not recognized ? And also run the "bbcmd hobbitd_alert --test HOSTNAME SERVICE" to see how it processes the config ? Regards, Henrik