Re: [collectd] Debian, collectd hostname lookup

2015-04-07 Thread Melkor Lord
On Tue, Mar 31, 2015 at 6:29 PM, Mihamina Rakotomandimby 
mihamina.rakotomandi...@rktmb.org wrote:

 On Debian, at post-install, Collectd is fired up.
 If Collectd ever fails to lookup its IP adress from its hostname, the
 service startup fails and thus the package install.


On your machines create a simple script which exits with return code 101
and place it in /usr/sbin/policy-rc.d

With that, any installation of a service makes post-install script to not
start them up. This allows you post install customization before actually
activating the service for real.

man invoke-rc.d for further details.

-- 
Unix _IS_ user friendly, it's just selective about who its friends are.
___
collectd mailing list
collectd@verplant.org
http://mailman.verplant.org/listinfo/collectd


Re: [collectd] Debian, collectd hostname lookup

2015-03-31 Thread Mihamina Rakotomandimby

On 03/31/2015 07:29 PM, Mihamina Rakotomandimby wrote:

Hi all
On Debian, at post-install, Collectd is fired up.
If Collectd ever fails to lookup its IP adress from its hostname, the 
service startup fails and thus the package install.
As I am going to deploy a consequent set of machines with CFEngine and 
its package bundle, I would like to perform pre install checks to be 
sure the conditions are fullfilled before I launch the package install.




One workaround is to disable  FQDNLookup by initially placing a 
configuration file, that wont be overwritten by automated package 
installation.


___
collectd mailing list
collectd@verplant.org
http://mailman.verplant.org/listinfo/collectd


[collectd] Debian, collectd hostname lookup

2015-03-31 Thread Mihamina Rakotomandimby

Hi all

On Debian, at post-install, Collectd is fired up.
If Collectd ever fails to lookup its IP adress from its hostname, the 
service startup fails and thus the package install.


As I am going to deploy a consequent set of machines with CFEngine and 
its package bundle, I would like to perform pre install checks to be 
sure the conditions are fullfilled before I launch the package install.


How to get the machine hostname to have exactly the same result as collectd?
- hostname (without options?)
- hostname --fqdn

How to perform the lookup excactly as collectd would do it (/etc/hosts 
is included) ?

- dig ? (with some parameters?)
- nslookup ? (with some parameters?)


If some test fail, I need to deploy the right fix and only when all is 
clear I will launch package installation.
What is important to me is to to be able to script some check the 
closest way as collectd would.


Thank you for you help.
___
collectd mailing list
collectd@verplant.org
http://mailman.verplant.org/listinfo/collectd