List of Variables passed to Scripts
Hi,
Is there a list of the variables that are passed to alerting scripts and what they contain? I haven't found a list and I would like to make our custom alerting script much more descriptive by adding items such as IP address, ...
Thanks.
Actually I found the IP but I know there are others that aren't currently documented.
Thanks.
On 3/19/07, Geoff Hallford <geoff.hallford at gmail.com> wrote:
Hi,
Is there a list of the variables that are passed to alerting scripts and what they contain? I haven't found a list and I would like to make our custom alerting script much more descriptive by adding items such as IP address, ...
Thanks.
-- 'If my answers frighten you then you should cease asking scary questions.' --Sam Jackson
Check the man pages for hobbit-alerts.cfg; at the end is the list of environment variables passed to the scripts.
Tom
From: Geoff Hallford [mailto:geoff.hallford at gmail.com] Sent: Monday, March 19, 2007 1:01 PM To: hobbit at hswn.dk Subject: [hobbit] List of Variables passed to Scripts
Hi,
Is there a list of the variables that are passed to alerting scripts and what they contain? I haven't found a list and I would like to make our custom alerting script much more descriptive by adding items such as IP address, ...
Thanks.
CONFIDENTIALITY NOTICE: This email and any attachments are for the
exclusive and confidential use of the intended recipient. If you are not
the intended recipient, please do not read, distribute or take action in
reliance upon this message. If you have received this in error, please
notify us immediately by return email and promptly delete this message
and its attachments from your computer system. We do not waive
attorney-client or work product privilege by the transmission of this
message.
Hi Tom,
Thanks I know about this list but it doesn't provide all variables passed to the scripts. When I wanted to find out a couple months ago, how to include the DESCR tag (from bb-hosts) in my script, Henrik told me I could use the $BBH_DESCRIPTION variable and it does work and is passed to the script. This variable is not included in the list in hobbit-alerts.cfg man page. I am just wondering if there are more variables not listed in there, that are passed because I have alerts for 8 organizations on my server and about 700 servers/devices, so I would like to be more descriptive if possible in my alerting.
Thanks for the thought though.
On 3/19/07, Kauffman, Tom <KauffmanT at nibco.com> wrote:
Check the man pages for hobbit-alerts.cfg; at the end is the list of environment variables passed to the scripts.
Tom
*From:* Geoff Hallford [mailto:geoff.hallford at gmail.com] *Sent:* Monday, March 19, 2007 1:01 PM *To:* hobbit at hswn.dk *Subject:* [hobbit] List of Variables passed to Scripts
Hi,
Is there a list of the variables that are passed to alerting scripts and what they contain? I haven't found a list and I would like to make our custom alerting script much more descriptive by adding items such as IP address, ...
Thanks.
CONFIDENTIALITY NOTICE: This email and any attachments are for the exclusive and confidential use of the intended recipient. If you are not the intended recipient, please do not read, distribute or take action in reliance upon this message. If you have received this in error, please notify us immediately by return email and promptly delete this message and its attachments from your computer system. We do not waive attorney-client or work product privilege by the transmission of this message.
-- 'If my answers frighten you then you should cease asking scary questions.' --Sam Jackson
On 3/19/07, Geoff Hallford <geoff.hallford at gmail.com> wrote:
Hi Tom,
Thanks I know about this list but it doesn't provide all variables passed to the scripts. When I wanted to find out a couple months ago, how to include the DESCR tag (from bb-hosts) in my script, Henrik told me I could use the $BBH_DESCRIPTION variable and it does work and is passed to the script. This variable is not included in the list in hobbit-alerts.cfg man page. I am just wondering if there are more variables not listed in there, that are passed because I have alerts for 8 organizations on my server and about 700 servers/devices, so I would like to be more descriptive if possible in my alerting.
Did you try putting something like:
env > /tmp/alert.env
into the alert script?? It should tell you *everything* that gets passed in the environment.
Ralph Mitchell
Forgot about env. That works perfectly to get the info I need.
Thanks.
On 3/19/07, Ralph Mitchell <ralphmitchell at gmail.com> wrote:
On 3/19/07, Geoff Hallford <geoff.hallford at gmail.com> wrote:
Hi Tom,
Thanks I know about this list but it doesn't provide all variables passed to the scripts. When I wanted to find out a couple months ago, how to include the DESCR tag (from bb-hosts) in my script, Henrik told me I could use the $BBH_DESCRIPTION variable and it does work and is passed to the script. This variable is not included in the list in hobbit-alerts.cfg man page. I am just wondering if there are more variables not listed in there, that are passed because I have alerts for 8 organizations on my server and about 700 servers/devices, so I would like to be more descriptive if possible in my alerting.
Did you try putting something like:
env > /tmp/alert.env
into the alert script?? It should tell you *everything* that gets passed in the environment.
Ralph Mitchell
To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk
Make a script that performs the "export" command, and logs the output to a file, then you should be able to see all the available variables, including Hobbit ones :)
-Charles
Geoff Hallford wrote:
Hi Tom,
Thanks I know about this list but it doesn't provide all variables passed to the scripts. When I wanted to find out a couple months ago, how to include the DESCR tag (from bb-hosts) in my script, Henrik told me I could use the $BBH_DESCRIPTION variable and it does work and is passed to the script. This variable is not included in the list in hobbit-alerts.cfg man page. I am just wondering if there are more variables not listed in there, that are passed because I have alerts for 8 organizations on my server and about 700 servers/devices, so I would like to be more descriptive if possible in my alerting.
Thanks for the thought though.
On 3/19/07, *Kauffman, Tom* <KauffmanT at nibco.com <mailto:KauffmanT at nibco.com>> wrote:
Check the man pages for hobbit-alerts.cfg; at the end is the list of environment variables passed to the scripts. Tom ------------------------------------------------------------------------ *From:* Geoff Hallford [mailto: geoff.hallford at gmail.com <mailto:geoff.hallford at gmail.com>] *Sent:* Monday, March 19, 2007 1:01 PM *To:* hobbit at hswn.dk <mailto:hobbit at hswn.dk> *Subject: * [hobbit] List of Variables passed to Scripts Hi, Is there a list of the variables that are passed to alerting scripts and what they contain? I haven't found a list and I would like to make our custom alerting script much more descriptive by adding items such as IP address, ... Thanks. CONFIDENTIALITY NOTICE: This email and any attachments are for the exclusive and confidential use of the intended recipient. If you are not the intended recipient, please do not read, distribute or take action in reliance upon this message. If you have received this in error, please notify us immediately by return email and promptly delete this message and its attachments from your computer system. We do not waive attorney-client or work product privilege by the transmission of this message.-- 'If my answers frighten you then you should cease asking scary questions.' --Sam Jackson
Thanks Charles. The 'env' command gave me the same results but a good suggestion none the less.
On 3/20/07, Charles Jones <jonescr at cisco.com> wrote:
Make a script that performs the "export" command, and logs the output to a file, then you should be able to see all the available variables, including Hobbit ones :)
-Charles
Geoff Hallford wrote:
Hi Tom,
Thanks I know about this list but it doesn't provide all variables passed to the scripts. When I wanted to find out a couple months ago, how to include the DESCR tag (from bb-hosts) in my script, Henrik told me I could use the $BBH_DESCRIPTION variable and it does work and is passed to the script. This variable is not included in the list in hobbit-alerts.cfg man page. I am just wondering if there are more variables not listed in there, that are passed because I have alerts for 8 organizations on my server and about 700 servers/devices, so I would like to be more descriptive if possible in my alerting.
Thanks for the thought though.
On 3/19/07, Kauffman, Tom <KauffmanT at nibco.com> wrote:
Check the man pages for hobbit-alerts.cfg; at the end is the list of environment variables passed to the scripts.
Tom
*From:* Geoff Hallford [mailto: geoff.hallford at gmail.com] *Sent:* Monday, March 19, 2007 1:01 PM *To:* hobbit at hswn.dk *Subject: *[hobbit] List of Variables passed to Scripts
Hi,
Is there a list of the variables that are passed to alerting scripts and what they contain? I haven't found a list and I would like to make our custom alerting script much more descriptive by adding items such as IP address, ...
Thanks.
CONFIDENTIALITY NOTICE: This email and any attachments are for the exclusive and confidential use of the intended recipient. If you are not the intended recipient, please do not read, distribute or take action in reliance upon this message. If you have received this in error, please notify us immediately by return email and promptly delete this message and its attachments from your computer system. We do not waive attorney-client or work product privilege by the transmission of this message.
-- 'If my answers frighten you then you should cease asking scary questions.' --Sam Jackson
-- 'If my answers frighten you then you should cease asking scary questions.' --Sam Jackson
participants (4)
-
geoff.hallford@gmail.com
-
jonescr@cisco.com
-
KauffmanT@nibco.com
-
ralphmitchell@gmail.com