2011-06-28 Sancho Lerena <slrena@artica.es>
* unix/Linux/pandora_agent.conf: Some changes in comments. * unix/pandora_agent: Updated version. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4493 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
2664eba7b2
commit
3b0ab10901
|
@ -1,3 +1,9 @@
|
|||
2011-06-28 Sancho Lerena <slrena@artica.es>
|
||||
|
||||
* unix/Linux/pandora_agent.conf: Some changes in comments.
|
||||
|
||||
* unix/pandora_agent: Updated version.
|
||||
|
||||
2011-06-28 Sergio Martin <sergio.martin@artica.es>
|
||||
|
||||
* unix/Linux/pandora_agent.conf
|
||||
|
|
|
@ -40,7 +40,10 @@ udp_server_auth_address 0.0.0.0
|
|||
# Group assigned for this agent (descriptive, p.e: Servers)
|
||||
#group Servers
|
||||
|
||||
# address: Enforce to server a ip address to this agent
|
||||
# address: Enforce to server a ip address to this agent
|
||||
# You can also try to detect the first IP using "auto", for example
|
||||
#address auto
|
||||
# or setting a fixed IP address, like for example:
|
||||
#address 192.168.36.73
|
||||
|
||||
# Autotime: Enforce to server to ignore timestamp coming from this
|
||||
|
@ -54,11 +57,13 @@ udp_server_auth_address 0.0.0.0
|
|||
# Agent position paramters
|
||||
# Those parameters define the geographical position of the agent
|
||||
|
||||
# gis_exec: Call a script that returns a string with "latitude,longitude,altitude"
|
||||
# gis_exec: Call a script that returns a string with a fixed
|
||||
# format of latitude,longitude,altitude
|
||||
# i.e.: 41.377,-5.105,2.365
|
||||
|
||||
#gix_exec /tmp/gis.sh
|
||||
#gis_exec /tmp/gis.sh
|
||||
|
||||
# This sets the GIS coordinates as fixed values:
|
||||
# latitude
|
||||
#latitude 0
|
||||
# longitude
|
||||
|
@ -66,7 +71,7 @@ udp_server_auth_address 0.0.0.0
|
|||
# altitude
|
||||
#altitude 0
|
||||
|
||||
#Position description
|
||||
#GPS Position description
|
||||
#position_description Madrid, centro
|
||||
|
||||
# By default agent try to take default encoding defined in host.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/perl
|
||||
# **********************************************************************
|
||||
# Pandora FMS Generic Unix/Perl Agent
|
||||
# (c) 2010 Artica Soluciones Tecnológicas
|
||||
# (c) 2009-2011 Artica Soluciones Tecnológicas
|
||||
# with the help of many people. Please see http://pandorafms.org
|
||||
# This code is licensed under GPL 2.0 license.
|
||||
# **********************************************************************
|
||||
|
@ -12,7 +12,7 @@ pandora_agent - Pandora FMS Agent
|
|||
|
||||
=head1 VERSION
|
||||
|
||||
Version 3.2
|
||||
Version 4.0
|
||||
|
||||
=head1 USAGE
|
||||
|
||||
|
@ -52,8 +52,8 @@ if (!$@) {
|
|||
threads::shared::share (\$Sem);
|
||||
}
|
||||
|
||||
use constant AGENT_VERSION => '3.2';
|
||||
use constant AGENT_BUILD => '101227';
|
||||
use constant AGENT_VERSION => '4.0';
|
||||
use constant AGENT_BUILD => '110629';
|
||||
|
||||
# Commands to retrieve total memory information in kB
|
||||
use constant TOTALMEMORY_CMDS => {
|
||||
|
@ -1591,6 +1591,7 @@ while (1) {
|
|||
if(defined($Conf{'address'})) {
|
||||
# Check if address is auto to get the local ip
|
||||
if ($Conf{'address'} eq 'auto') {
|
||||
# Tested on Ubuntu, debian, Suse, Solaris 10 and AIX 5.1
|
||||
$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($address);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue