2011-06-28 Sergio Martin <sergio.martin@artica.es>

* unix/Linux/pandora_agent.conf
	unix/pandora_agent: Changed the ip_address token name
	to address to compatibility with the server works



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4491 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
zarzuelo 2011-06-28 09:47:10 +00:00
parent 588ce7bff5
commit be3c0077d3
3 changed files with 17 additions and 11 deletions

View File

@ -1,3 +1,9 @@
2011-06-28 Sergio Martin <sergio.martin@artica.es>
* unix/Linux/pandora_agent.conf
unix/pandora_agent: Changed the ip_address token name
to address to compatibility with the server works
2011-06-28 Sergio Martin <sergio.martin@artica.es> 2011-06-28 Sergio Martin <sergio.martin@artica.es>
* unix/Linux/pandora_agent.conf * unix/Linux/pandora_agent.conf

View File

@ -40,8 +40,8 @@ udp_server_auth_address 0.0.0.0
# Group assigned for this agent (descriptive, p.e: Servers) # Group assigned for this agent (descriptive, p.e: Servers)
#group Servers #group Servers
# ip_address: Enforce to server a ip address to this agent # address: Enforce to server a ip address to this agent
#ip_address 192.168.36.73 #address 192.168.36.73
# Autotime: Enforce to server to ignore timestamp coming from this # Autotime: Enforce to server to ignore timestamp coming from this
# agent, used when agents has no timer or it's inestable. 1 to enable # agent, used when agents has no timer or it's inestable. 1 to enable

View File

@ -1586,16 +1586,16 @@ while (1) {
# Check file collections # Check file collections
check_collections () unless ($Conf{'debug'} eq '1'); check_collections () unless ($Conf{'debug'} eq '1');
my $ip_address; my $address;
if(defined($Conf{'ip_address'})) { if(defined($Conf{'address'})) {
# Check if ip_address is auto to get the local ip # Check if address is auto to get the local ip
if ($Conf{'ip_address'} eq 'auto') { if ($Conf{'address'} eq 'auto') {
$ip_address = `ifconfig -a | grep -v '127.0.0' | grep '[0-9]*\\.[0-9]*\\.[0-9]*' | awk '{ print \$2 }' | head -1 | sed -e 's/addr\\://' | sed -e 's/inet\\://'`; $address = `ifconfig -a | grep -v '127.0.0' | grep '[0-9]*\\.[0-9]*\\.[0-9]*' | awk '{ print \$2 }' | head -1 | sed -e 's/addr\\://' | sed -e 's/inet\\://'`;
chomp($ip_address); chomp($address);
} }
else { else {
$ip_address = $Conf{'ip_address'}; $address = $Conf{'address'};
} }
} }
@ -1605,8 +1605,8 @@ while (1) {
"' version='" . AGENT_VERSION . '(Build ' . AGENT_BUILD . ')' . ($Conf{'autotime'} eq '1' ? '' : "' timestamp='" . strftime ('%Y/%m/%d %H:%M:%S', localtime ())) . "' version='" . AGENT_VERSION . '(Build ' . AGENT_BUILD . ')' . ($Conf{'autotime'} eq '1' ? '' : "' timestamp='" . strftime ('%Y/%m/%d %H:%M:%S', localtime ())) .
"' agent_name='" . $Conf{'agent_name'} . "' timezone_offset='". $Conf{'timezone_offset'}; "' agent_name='" . $Conf{'agent_name'} . "' timezone_offset='". $Conf{'timezone_offset'};
if (defined ($Conf{'ip_address'})) { if (defined ($Conf{'address'})) {
$Xml .= "' ip_address='" .$ip_address; $Xml .= "' address='" .$address;
} }
if (defined ($Conf{'parent_agent_name'})) { if (defined ($Conf{'parent_agent_name'})) {