Xymon Mailing List Archive search

bb-hosts include format

3 messages in this thread

list Galen Johnson · Sat, 05 May 2007 17:33:51 -0400 ·
What is the format for the bb-hosts include directive?  I know you can use the full path...where would a relative filename be relative from? $SERVER/etc?  Can it handle variables like $BBHOME?  I need to know in order to make the notes script follow the definitions. (assuming the dispinclude and netinclude follow the same principle)

=G=
list Henrik Størner · Sat, 5 May 2007 23:51:41 +0200 ·
On Sat, May 05, 2007 at 05:33:51PM -0400, Galen Johnson wrote:
What is the format for the bb-hosts include directive?  
  include FILENAME
or
  directory DIRNAME

The latter reads all files in the directory, except
- files beginning with a dot .
- files ending with a tilde ~
- files ending with ",v"

The filenames in DIRNAME are sorted alphabetically before being read.
I know you can use the full path...where would a relative filename be relative from? 
It's relative to the directory where the original file was located.
Can it handle variables like $BBHOME?
No.

I need to know in order to make the notes script follow the definitions. (assuming the dispinclude and netinclude follow the same principle)
You could take a shortcut, and instead of reading FILENAME directly, you'd just read the output from "bbhostshow FILENAME". That takes care
of the include+directory handling.


Regards,
Henrik
list Galen Johnson · Sat, 05 May 2007 20:56:31 -0400 ·
quoted from Henrik Størner
Henrik Stoerner wrote:
On Sat, May 05, 2007 at 05:33:51PM -0400, Galen Johnson wrote:
  
What is the format for the bb-hosts include directive?      
  include FILENAME
or
  directory DIRNAME

The latter reads all files in the directory, except
- files beginning with a dot .
- files ending with a tilde ~
- files ending with ",v"

The filenames in DIRNAME are sorted alphabetically before being read.

  
I know you can use the full path...where would a relative filename be relative from?     
It's relative to the directory where the original file was located.

  
Can it handle variables like $BBHOME?
    
No.

I need to know in order to make the notes script follow the definitions. (assuming the dispinclude and netinclude follow the same principle)
    
You could take a shortcut, and instead of reading FILENAME directly, you'd just read the output from "bbhostshow FILENAME". That takes care
of the include+directory handling.


Regards,
Henrik

  
Man, that "shortcut" saved me an hour or so...I was able to add 1 line and change another to make it get the info...you rock, Henrik.

=G=