Bacula-users

Re: [Bacula-users] Access to client name in the run before job script?

2008-10-31 08:54:55
Subject: Re: [Bacula-users] Access to client name in the run before job script?
From: Arno Lehmann <al AT its-lehmann DOT de>
To: bacula-users AT lists.sourceforge DOT net
Date: Fri, 31 Oct 2008 13:51:06 +0100
Hi,

31.10.2008 12:37, Kevin Keane wrote:
> Thank you very much! It almost works. Turns out that what I actually 
> need isn't the client name as I had thought, but the address of the 
> client (the DNS name). More accurately, what I really need is the name 
> under which the client is known to Nagios - which fortunately I can 
> easily derive from the DNS name.
> 
> Do you have any ideas for that? If not, I can probably come up with a 
> workaround on my own.

I'm doing this with a static mapping, i.e. my Bacula clients are all 
called hostname-fd, the Nagios name is hostname, and the DNS name is 
hostname.subdomain.domain.de.

Then, with minimal shell pattern matching and substitution I get what 
I need.

Arno

> Arno Lehmann wrote:
>> Hi,
>>
>> 31.10.2008 11:06, Kevin Keane wrote:
>>   
>>> Hi,
>>>
>>> I'm trying to find a way to pass the client name to the run_before 
>>> script, but I can't see a way to actually make it work. Apparently, 
>>> variable expansion is not available for the Run Before Job?
>>>
>>> In my JobDef, I have the line:
>>>
>>>   Run Before Job = "/usr/local/sbin/myscript ${Client}"
>>>
>>> The script executes for each backup job, but always receives the literal 
>>> ${Client} instead of the actual client name.
>>>
>>> Is there a way to make this work?
>>>     
>> Probably... try "%c" instead of the $-Syntax (which would, if at all, 
>> only work in a counter), as per 
>> http://www.bacula.org/manuals/en/install/install/Configuring_Director.html#character_substitution
>>
>> Arno
>>
>>   
>>> Thanks!
>>>     
>>   
> 
> 
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Bacula-users mailing list
> Bacula-users AT lists.sourceforge DOT net
> https://lists.sourceforge.net/lists/listinfo/bacula-users
> 

-- 
Arno Lehmann
IT-Service Lehmann
Sandstr. 6, 49080 Osnabrück
www.its-lehmann.de

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users

<Prev in Thread] Current Thread [Next in Thread>