* Fixed minor issues for finish Pandora 1.2 Beta 2.

git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@105 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
slerena 2006-07-06 17:17:49 +00:00
parent e5e7f96f5a
commit 8d93ca3ce9
45 changed files with 1487 additions and 405 deletions

View File

@ -0,0 +1,2 @@
Sancho Lerena <slerena@gmail.com>
Raul Mateos <raulofpandora@gmail.com>

View File

@ -0,0 +1,92 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too.
When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations.
Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and modification follow.
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program.
You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License.
c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program.
In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License.
7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.
10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS

View File

@ -0,0 +1,27 @@
Installing Pandora Agent in Unix systems
========================================
Pandora currently has agents for Linux, Solaris, AIX, HP-UX(*), and BSD (IPSO, FreeBSD, OpenBSD...) (*)
(*) Only Pandora Agent vesion 1.1, not version 1.2
Pandora Agent is a shell script that collects info from host machine, write in a XML file (called datafile), and send to the server using SSH (scp) or using any other way, like automated FTP.
There are two configuration files:
pandora_agent.conf
pandora_user.conf
A script file (the pandora agent)
pandora_agent.sh
And a startup script
pandora_agent_daemon
Pandora Agents use pandora_agent.conf to load initial data and load module data. Modules are atomic source of information. Please refer to Pandora Agents configuration - Quick Guide for more information.
pandora_user.conf is low level configuration. It will be executed in each iteration of pandora_agent.sh script. Please read it and see how it works.
There are a startup script called "pandora_agent_daemon" used to load Pandora Agent at boot time, and to stop ip. It depends on what type of Unix are you running. Test it before including it your init level script directory, it accepts start / stop / restart commands, like usual in Unix System V systems.

41
pandora_agents/aix/README Normal file
View File

@ -0,0 +1,41 @@
Pandora: The Free Distributed Monitoring System
===============================================
Version 1.2
What is Pandora DMS
-------------------
Pandora are a Free Software set of programs that allows to analyze in a visual way status and performance of several parameters from different Operating Systems, servers, applications and hardware systems as Firewalls, Proxies, Data Bases, Web Servers or Routers. All integrated into an open and distributed architecture.
Pandora can be deployed in every Operating System. You have an agent for every platform. Pandora can monitor hardware systems with TCP/IP Stack, as load balancers, routers, switches, printers and so on.
Pandora has six components: Pandora Data Server, Pandora Network Server, Pandora SNMP Console, Pandora Agents, Pandora Database and Pandora Web Management System (Web Console).
Pandora Servers and SNMP Console
They are the recipient of bundles of information and the generators of alerts; they are the brain of the system. We can have several servers for very big systems or a single server. They are developed in Perl and works under any platform, with the required modules. Nevertheless its "official" platform is GNU/Linux. They also insert the gathered data into the Database. You can have several Pandora Servers connected with the same Database.
Pandora Web Console
It allows to manage the system and to operate with it; it's the user interface of Pandora. We can have several Web Consoles in the same implantation. It is developed in PHP and leans on a Data Base and a Web Server, being able to work in any platform: GNU/Linux, Solaris, Win2000, AIX and others.
Pandora Database
Core module of Pandora (as you can see in the architecture overview). In this database resides all the information of the enterprise, for example, all data gathered by agents, all configuration defined by administrator, all events, incidents, audit info... At this moment, only MySQL DataBase is supported. More Databases in the future.
Pandora Agents
They can monitor any numeric parameter, boolean states, strings or numerical incremental data and/or condition. They have a centralized architecture based on lightweight design for agents (shellscript, wsh, perl) and light agents to collect data. They support all type of platforms (Microsoft, AIX, Solaris, GNU/Linux, IPSO, FreeBSD, etc) because the agents are completely free software, and they communicate using SSH, FTP, NFS or other good way, using an XML container to transport data.
What do I need?
---------------
Perl, Perl Modules, MySQL, PHP, PHP Modules. See the Installation Documentation or go to http://pandora.sourceforge.net
License
-------
The project is distributed under the GPL License v2 or later.
Copyright (C) 2004-2006 Sancho Lerena.

View File

@ -1,16 +1,15 @@
# Fichero de configuracion base de agentes de Pandora
# Base config file for Pandora agents
# Version 1.1, AIX version
# Version 1.2 Beta2, AIX version
# General Parameters
# ==================
server_ip pandora_server
server_ip 192.168.50.1
server_path /opt/pandora_server/data_in
pandora_path /opt/pandora_agent
temporal /opt/pandora_agent/data_out
interval 300
#agent_name satellite_agent
interval 300
checksum 0
debug 0
@ -54,6 +53,7 @@ module_end
module_begin
module_name cpu_sys
module_type generic_data
module_interval 2
module_exec vmstat | tail -1 | awk '{ print $15 }'
module_end

View File

@ -1,13 +1,13 @@
#!/bin/sh
#!/usr/bin/ksh
# **********************************************************************
# Agente Generico Pandora
# AIX version
# (c) Sancho Lerena 2003-2005, slerena@gmail.com
# Este codigo esta licenciado bajo la licencia GPL 2.0
# This code is licenced under GPL 2.0 licence.
# Pandora Agent for AIX
# v1.2
# (c) Sancho Lerena 2003-2006, slerena@gmail.com
# Este codigo esta licenciado bajo la licencia GPL 2.0 o posterior
# This code is licenced under GPL 2.0 licence or later
# **********************************************************************
AGENT_VERSION=1.2a
AGENT_VERSION="1.2 Beta2"
OLDIFS=$IFS
# Stupid trick to use IFS in AIX ... doesnt work standard $'\n' :-?
@ -19,70 +19,70 @@ TIMESTAMP=`date +"%Y/%m/%d %H:%M:%S"`
if [ -z "$1" ]
then
echo " "
echo "FATAL ERROR: I need an argument to PANDORA AGENT home path"
echo " "
echo " example: /opt/pandora_ng/pandora_agent.sh /opt/pandora_ng "
echo " "
exit
echo " "
echo "FATAL ERROR: I need an argument to PANDORA AGENT home path"
echo " "
echo " example: /opt/pandora_ng/pandora_agent.sh /opt/pandora_ng "
echo " "
exit
else
PANDORA_HOME=$1
PANDORA_HOME=$1
fi
if [ -z "`cat $PANDORA_HOME/pandora_agent.conf`" ]
then
echo " "
echo "FATAL ERROR: Cannot load $PANDORA_HOME/pandora_agent.conf"
echo " "
exit
echo " "
echo "FATAL ERROR: Cannot load $PANDORA_HOME/pandora_agent.conf"
echo " "
exit
fi
echo "$TIMESTAMP - Reading general config parameters from .conf file" >> $PANDORA_HOME/pandora.log
# Default values
DEBUG_MODE=0
CHECKSUM_MODE=1
CHECKSUM_MODE=0
IFS=$NEWIFS
for a in `cat $PANDORA_HOME/pandora_agent.conf | grep -v "^#" | grep -v "^module" `
do
a=`echo $a | tr -s " " " "`
# Get general configuration parameters from config file
if [ ! -z "`echo $a | grep '^server_ip'`" ]
then
SERVER_IP=`echo $a | awk '{ print $2 }'`
echo "$TIMESTAMP - [SETUP] - Server IP Address is $SERVER_IP" >> $PANDORA_HOME/pandora.log
fi
if [ ! -z "`echo $a | grep '^server_path'`" ]
then
SERVER_PATH=`echo $a | awk '{ print $2 }'`
echo "$TIMESTAMP - [SETUP] - Server Path is $SERVER_PATH" >> $PANDORA_HOME/pandora.log
fi
if [ ! -z "`echo $a | grep '^temporal'`" ]
then
TEMP=`echo $a | awk '{ print $2 }'`
echo "$TIMESTAMP - [SETUP] - Temporal Path is $TEMP" >> $PANDORA_HOME/pandora.log
fi
if [ ! -z "`echo $a | grep '^interval'`" ]
then
INTERVAL=`echo $a | awk '{ print $2 }'`
echo "$TIMESTAMP - [SETUP] - Interval is $INTERVAL seconds" >> $PANDORA_HOME/pandora.log
fi
if [ ! -z "`echo $a | grep '^agent_name'`" ]
then
NOMBRE_HOST=`echo $a | awk '{ print $2 }' `
echo "$TIMESTAMP - [SETUP] - Agent name is $NOMBRE_HOST " >> $PANDORA_HOME/pandora.log
fi
if [ ! -z "`echo $a | grep '^debug'`" ]
then
DEBUG_MODE=`echo $a | awk '{ print $2 }' `
echo "$TIMESTAMP - [SETUP] - Debug mode $DEBUG_MODE " >> $PANDORA_HOME/pandora.log
fi
if [ ! -z "`echo $a | grep '^checksum'`" ]
then
CHECKSUM_MODE=`echo $a | awk '{ print $2 }' `
echo "$TIMESTAMP - [SETUP] - Checksum mode is $CHECKSUM_MODE " >> $PANDORA_HOME/pandora.log
fi
a=`echo $a | tr -s " " " "`
# Get general configuration parameters from config file
if [ ! -z "`echo $a | grep '^server_ip'`" ]
then
SERVER_IP=`echo $a | awk '{ print $2 }'`
echo "$TIMESTAMP - [SETUP] - Server IP Address is $SERVER_IP" >> $PANDORA_HOME/pandora.log
fi
if [ ! -z "`echo $a | grep '^server_path'`" ]
then
SERVER_PATH=`echo $a | awk '{ print $2 }'`
echo "$TIMESTAMP - [SETUP] - Server Path is $SERVER_PATH" >> $PANDORA_HOME/pandora.log
fi
if [ ! -z "`echo $a | grep '^temporal'`" ]
then
TEMP=`echo $a | awk '{ print $2 }'`
echo "$TIMESTAMP - [SETUP] - Temporal Path is $TEMP" >> $PANDORA_HOME/pandora.log
fi
if [ ! -z "`echo $a | grep '^interval'`" ]
then
INTERVAL=`echo $a | awk '{ print $2 }'`
echo "$TIMESTAMP - [SETUP] - Interval is $INTERVAL seconds" >> $PANDORA_HOME/pandora.log
fi
if [ ! -z "`echo $a | grep '^agent_name'`" ]
then
NOMBRE_HOST=`echo $a | awk '{ print $2 }' `
echo "$TIMESTAMP - [SETUP] - Agent name is $NOMBRE_HOST " >> $PANDORA_HOME/pandora.log
fi
if [ ! -z "`echo $a | grep '^debug'`" ]
then
DEBUG_MODE=`echo $a | awk '{ print $2 }' `
echo "$TIMESTAMP - [SETUP] - Debug mode $DEBUG_MODE " >> $PANDORA_HOME/pandora.log
fi
if [ ! -z "`echo $a | grep '^checksum'`" ]
then
CHECKSUM_MODE=`echo $a | awk '{ print $2 }' `
echo "$TIMESTAMP - [SETUP] - Checksum mode is $CHECKSUM_MODE " >> $PANDORA_HOME/pandora.log
fi
done
@ -94,125 +94,160 @@ OS_NAME=`uname -s`
# Hostname
if [ -z "$NOMBRE_HOST" ]
then
NOMBRE_HOST=`/bin/hostname`
NOMBRE_HOST=`/bin/hostname`
fi
# Default values
CONTADOR=0
EXECUTE=1
MODULE_END=0
while [ "1" = "1" ]
do
CONTADOR=`expr $CONTADOR + 1`
# Fecha y hora. Se genera un serial (numero de segundos desde 1970) para cada paquete generado.
TIMESTAMP=`date +"%Y/%m/%d %H:%M:%S"`
SERIAL=$CONTADOR
# Nombre de los archivos
DATA=$TEMP/$NOMBRE_HOST.$SERIAL.data
CHECKSUM=$TEMP/$NOMBRE_HOST.$SERIAL.checksum
PANDORA_FILES="$TEMP/$NOMBRE_HOST.$SERIAL.*"
# Fecha y hora. Se genera un serial (numero de segundos desde 1970) para cada paquete generado.
TIMESTAMP=`date +"%Y/%m/%d %H:%M:%S"`
SERIAL=`date +"%S%M%m%H"`
# Nombre de los archivos
DATA=$TEMP/$NOMBRE_HOST.$SERIAL.data
CHECKSUM=$TEMP/$NOMBRE_HOST.$SERIAL.checksum
PANDORA_FILES="$TEMP/$NOMBRE_HOST.$SERIAL.*"
DATA2=$TEMP/$NOMBRE_HOST.$SERIAL.data_temp
# Makes data packet
echo "<agent_data os_name='$OS_NAME' os_version='$OS_VERSION' interval='$INTERVAL' version='$AGENT_VERSION' timestamp='$TIMESTAMP' agent_name='$NOMBRE_HOST'>" > $DATA
if [ "$DEBUG_MODE" = "1" ]
then
echo "$TIMESTAMP - Reading module adquisition data from .conf file" >> $PANDORA_HOME/pandora.log
fi
for a in `cat $PANDORA_HOME/pandora_agent.conf | grep -v "^#" | grep "^module" `
do
a=`echo $a | tr -s " " " "`
if [ ! -z "`echo $a | grep '^module_exec'`" ]
then
execution=`echo $a | cut -c 13-`
res=`eval $execution`
if [ -z "$flux_string" ]
then
res=`eval expr $res 2> /dev/null`
fi
echo "<data>$res</data>" >> $DATA
fi
# Makes data packet
echo "<agent_data os_name='$OS_NAME' os_version='$OS_VERSION' interval='$INTERVAL' version='$AGENT_VERSION' timestamp='$TIMESTAMP' agent_name='$NOMBRE_HOST'>" > $DATA
if [ "$DEBUG_MODE" = "1" ]
then
echo "$TIMESTAMP - Reading module adquisition data from .conf file" >> $PANDORA_HOME/pandora.log
DEBUGOUTPUT=$PANDORA_HOME/pandora.log
else
DEBUGOUTPUT=/dev/null
fi
for a in `cat $PANDORA_HOME/pandora_agent.conf | grep -v "^#" | grep "^module" `
do
a=`echo $a | tr -s " " " "`
if [ ! -z "`echo $a | grep '^module_name'`" ]
then
name=`echo $a | cut -c 13-`
echo "<name>$name</name>" >> $DATA
fi
if [ ! -z "`echo $a | grep '^module_exec'`" ]
then
if [ $EXECUTE -eq 0 ]
then
execution=`echo $a | cut -c 13-`
res=`eval $execution 2> /dev/null`
if [ -z "$flux_string" ]
then
res=`eval expr $res 2> /dev/null`
fi
echo "<data>$res</data>" >> $DATA2
fi
fi
if [ ! -z "`echo $a | grep '^module_begin'`" ]
then
echo "<module>" >> $DATA
fi
if [ ! -z "`echo $a | grep -e '^module_max' `" ]
then
max=`echo $a | awk '{ print $2 }' `
echo "<max>$max</max>" >> $DATA
fi
if [ ! -z "`echo $a | grep -e '^module_min'`" ]
then
min=`echo $a | awk '{ print $2 }' `
echo "<min>$min</min>" >> $DATA
fi
if [ ! -z "`echo $a | grep -e '^module_description'`" ]
then
desc=`echo $a | cut -c 20- `
echo "<description>$desc</description>" >> $DATA
fi
if [ ! -z "`echo $a | grep '^module_name'`" ]
then
name=`echo $a | cut -c 13-`
echo "<name>$name</name>" >> $DATA2
fi
if [ ! -z "`echo $a | grep '^module_begin'`" ]
then
echo "<module>" >> $DATA2
EXECUTE=0
fi
if [ ! -z "`echo $a | grep -e '^module_max' `" ]
then
max=`echo $a | awk '{ print $2 }' `
echo "<max>$max</max>" >> $DATA2
fi
if [ ! -z "`echo $a | grep -e '^module_min'`" ]
then
min=`echo $a | awk '{ print $2 }' `
echo "<min>$min</min>" >> $DATA2
fi
if [ ! -z "`echo $a | grep -e '^module_description'`" ]
then
desc=`echo $a | cut -c 20- `
echo "<description>$desc</description>" >> $DATA2
fi
if [ ! -z "`echo $a | grep '^module_end'`" ]
then
echo "</module>" >> $DATA
fi
if [ ! -z "`echo $a | grep '^module_type'`" ]
then
if [ ! -z "`echo $a | grep '^module_end'`" ]
then
MODULE_END=1
echo "</module>" >> $DATA2
else
MODULE_END=0
fi
if [ ! -z "`echo $a | grep '^module_type'`" ]
then
mtype=`echo $a | cut -c 13-`
if [ ! -z "`echo $mtype | grep 'generic_data_string'`" ]
then
flux_string=1
else
flux_string=0
unset flux_string
then
flux_string=1
else
flux_string=0
unset flux_string
fi
echo "<type>$mtype</type>" >> $DATA
fi
done
echo "<type>$mtype</type>" >> $DATA2
fi
if [ ! -z "`echo $a | grep '^module_interval'`" ]
then
# Determine if execution is to be done
MODULEINTERVAL=`echo $a | awk '{ print $2 }'`
EXECUTE=`expr \( $CONTADOR + 1 \) % $MODULEINTERVAL`
fi
# Call for user-defined script for data adquisition
# If module end, and execute for this module is enabled
# then write
if [ $MODULE_END -eq "1" ]
then
if [ $EXECUTE -eq "0" ]
then
cat $DATA2 >> $DATA
fi
rm -Rf $DATA2 #> /dev/null 2> /dev/null
fi
if [ -f "$PANDORA_HOME/pandora_user.conf" ]
then
/bin/sh $PANDORA_HOME/pandora_user.conf >> $DATA
fi
done
# Finish data packet
echo "</agent_data>" >> $DATA
if [ "$DEBUG_MODE" = "1" ]
then
echo "$TIMESTAMP - Finish writing XML $DATA" >> $PANDORA_HOME/pandora.log
fi
# Count number of agent runs
CONTADOR=`expr $CONTADOR + 1`
# Keep a limit of 100 for overflow reasons
if [ $CONTADOR -eq 100 ]
then
CONTADOR=0
fi
# Calculate Checksum and prepare MD5 file
if [ "$CHECKSUM_MODE" = "1" ]
then
CHECKSUM_DATA=`cat $DATA | md5 `
else
CHECKSUM_DATA="No valid checksum"
fi
echo $CHECKSUM_DATA $DATA> $CHECKSUM
# Call for user-defined script for data adquisition
if [ -f "$PANDORA_HOME/pandora_user.conf" ]
then
/bin/sh $PANDORA_HOME/pandora_user.conf >> $DATA 2> /dev/null
fi
# Send packets to server and detele it
scp $PANDORA_FILES pandora@$SERVER_IP:$SERVER_PATH > /dev/null 2> /dev/null
if [ "$DEBUG_MODE" = "1" ]
then
echo "$TIMESTAMP - Copying $PANDORA_FILES to $SERVER_IP:$SERVER_PATH" >> $PANDORA_HOME/pandora.log
echo "Pandora Agent in debug mode. Exitting now"
exit
fi
rm -f $PANDORA_FILES> /dev/null
sleep $INTERVAL
# Finish data packet
echo "</agent_data>" >> $DATA
echo "$TIMESTAMP - Finish writing XML $DATA" >> $DEBUGOUTPUT
# Calculate Checksum and prepare MD5 file
if [ "$CHECKSUM_MODE" = 1 ]
then
CHECKSUM_DATA=`cat $DATA | md5 `
echo $CHECKSUM_DATA $DATA> $CHECKSUM
else
echo "NO MD5 CHECKSUM AVAILABLE" > $CHECKSUM
fi
# Send packets to server and delete it
scp $PANDORA_FILES pandora@$SERVER_IP:$SERVER_PATH"
if [ "$DEBUG_MODE" = 1 ]
then
echo "$TIMESTAMP - DEBUG :Copying $PANDORA_FILES to $SERVER_IP:$SERVER_PATH" >> $PANDORA_HOME/pandora.log
else
# Delete it
rm -f $PANDORA_FILES> /dev/null
fi
# Go to bed :-)
sleep $INTERVAL
done
# forever!

View File

@ -1,13 +1,22 @@
#!/bin/sh
# Script de arranque de Agente Pandora
#!/usr/bin/ksh
# Startup Script for Pandora Agent
# Sancho Lerena, <slerena@gmail.com>
# Version para AIX
# v1.1
# v1.2
# DONT USE WITH OPENSSH
# DOESNT WORK WHEN MAKES A CALL THAT USE @ CHARACTER
# USE DIRECTLY PANDORA AGENT SCRIPT
# for example: pandora_agent.sh /opt/pandora_agent/ &
exit
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin
PANDORA_PATH=/opt/pandora_agent/
DAEMON=pandora_agent.sh
PIDFILE=/var/run/pandora_agent.pid
PIDFILE=/var/locks/pandora_agent.pid
if [ ! -f $PANDORA_PATH/$DAEMON ]
@ -23,15 +32,21 @@ case "$1" in
echo "Pandora Agent is currently running on this machine. Aborting now..."
exit
fi
$PANDORA_PATH/$DAEMON $PANDORA_PATH >> $PANDORA_PATH/pandora.log & MYPID=$!
$PANDORA_PATH/$DAEMON $PANDORA_PATH >> $PANDORA_PATH/pandora.log & MYPID=$!
echo $MYPID > $PIDFILE
#MYPID=`ps -Alf | grep $DAEMON | grep -v grep | awk '{ print $4 }' | tail -1`
echo $MYPID > $PIDFILE
echo "Pandora Agent is now running with PID $MYPID"
;;
stop)
if [ -f $PIDFILE ]
then
echo "Stopping Pandora Agent."
kill -9 `cat $PIDFILE`
echo "Stopping Pandora Agent."
PID_2=`cat $PIDFILE`
if [ ! -z "`ps -f -p $PID_2 | grep -v grep | grep 'pandora_agent'`" ]
then
kill -9 `cat $PIDFILE`
fi
rm -f $PIDFILE
else
echo "Pandora Agent is not running, cannot stop it. Aborting now..."

View File

@ -0,0 +1,2 @@
Sancho Lerena <slerena@gmail.com>
Raul Mateos <raulofpandora@gmail.com>

View File

@ -0,0 +1,92 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too.
When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations.
Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and modification follow.
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program.
You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License.
c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program.
In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License.
7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.
10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS

View File

@ -0,0 +1,27 @@
Installing Pandora Agent in Unix systems
========================================
Pandora currently has agents for Linux, Solaris, AIX, HP-UX(*), and BSD (IPSO, FreeBSD, OpenBSD...) (*)
(*) Only Pandora Agent vesion 1.1, not version 1.2
Pandora Agent is a shell script that collects info from host machine, write in a XML file (called datafile), and send to the server using SSH (scp) or using any other way, like automated FTP.
There are two configuration files:
pandora_agent.conf
pandora_user.conf
A script file (the pandora agent)
pandora_agent.sh
And a startup script
pandora_agent_daemon
Pandora Agents use pandora_agent.conf to load initial data and load module data. Modules are atomic source of information. Please refer to Pandora Agents configuration - Quick Guide for more information.
pandora_user.conf is low level configuration. It will be executed in each iteration of pandora_agent.sh script. Please read it and see how it works.
There are a startup script called "pandora_agent_daemon" used to load Pandora Agent at boot time, and to stop ip. It depends on what type of Unix are you running. Test it before including it your init level script directory, it accepts start / stop / restart commands, like usual in Unix System V systems.

View File

@ -0,0 +1,41 @@
Pandora: The Free Distributed Monitoring System
===============================================
Version 1.2
What is Pandora DMS
-------------------
Pandora are a Free Software set of programs that allows to analyze in a visual way status and performance of several parameters from different Operating Systems, servers, applications and hardware systems as Firewalls, Proxies, Data Bases, Web Servers or Routers. All integrated into an open and distributed architecture.
Pandora can be deployed in every Operating System. You have an agent for every platform. Pandora can monitor hardware systems with TCP/IP Stack, as load balancers, routers, switches, printers and so on.
Pandora has six components: Pandora Data Server, Pandora Network Server, Pandora SNMP Console, Pandora Agents, Pandora Database and Pandora Web Management System (Web Console).
Pandora Servers and SNMP Console
They are the recipient of bundles of information and the generators of alerts; they are the brain of the system. We can have several servers for very big systems or a single server. They are developed in Perl and works under any platform, with the required modules. Nevertheless its "official" platform is GNU/Linux. They also insert the gathered data into the Database. You can have several Pandora Servers connected with the same Database.
Pandora Web Console
It allows to manage the system and to operate with it; it's the user interface of Pandora. We can have several Web Consoles in the same implantation. It is developed in PHP and leans on a Data Base and a Web Server, being able to work in any platform: GNU/Linux, Solaris, Win2000, AIX and others.
Pandora Database
Core module of Pandora (as you can see in the architecture overview). In this database resides all the information of the enterprise, for example, all data gathered by agents, all configuration defined by administrator, all events, incidents, audit info... At this moment, only MySQL DataBase is supported. More Databases in the future.
Pandora Agents
They can monitor any numeric parameter, boolean states, strings or numerical incremental data and/or condition. They have a centralized architecture based on lightweight design for agents (shellscript, wsh, perl) and light agents to collect data. They support all type of platforms (Microsoft, AIX, Solaris, GNU/Linux, IPSO, FreeBSD, etc) because the agents are completely free software, and they communicate using SSH, FTP, NFS or other good way, using an XML container to transport data.
What do I need?
---------------
Perl, Perl Modules, MySQL, PHP, PHP Modules. See the Installation Documentation or go to http://pandora.sourceforge.net
License
-------
The project is distributed under the GPL License v2 or later.
Copyright (C) 2004-2006 Sancho Lerena.

View File

@ -0,0 +1,2 @@
Sancho Lerena <slerena@gmail.com>
Raul Mateos <raulofpandora@gmail.com>

View File

@ -0,0 +1,92 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too.
When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations.
Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and modification follow.
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program.
You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License.
c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program.
In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License.
7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.
10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS

View File

@ -0,0 +1,27 @@
Installing Pandora Agent in Unix systems
========================================
Pandora currently has agents for Linux, Solaris, AIX, HP-UX(*), and BSD (IPSO, FreeBSD, OpenBSD...) (*)
(*) Only Pandora Agent vesion 1.1, not version 1.2
Pandora Agent is a shell script that collects info from host machine, write in a XML file (called datafile), and send to the server using SSH (scp) or using any other way, like automated FTP.
There are two configuration files:
pandora_agent.conf
pandora_user.conf
A script file (the pandora agent)
pandora_agent.sh
And a startup script
pandora_agent_daemon
Pandora Agents use pandora_agent.conf to load initial data and load module data. Modules are atomic source of information. Please refer to Pandora Agents configuration - Quick Guide for more information.
pandora_user.conf is low level configuration. It will be executed in each iteration of pandora_agent.sh script. Please read it and see how it works.
There are a startup script called "pandora_agent_daemon" used to load Pandora Agent at boot time, and to stop ip. It depends on what type of Unix are you running. Test it before including it your init level script directory, it accepts start / stop / restart commands, like usual in Unix System V systems.

View File

@ -0,0 +1,41 @@
Pandora: The Free Distributed Monitoring System
===============================================
Version 1.2
What is Pandora DMS
-------------------
Pandora are a Free Software set of programs that allows to analyze in a visual way status and performance of several parameters from different Operating Systems, servers, applications and hardware systems as Firewalls, Proxies, Data Bases, Web Servers or Routers. All integrated into an open and distributed architecture.
Pandora can be deployed in every Operating System. You have an agent for every platform. Pandora can monitor hardware systems with TCP/IP Stack, as load balancers, routers, switches, printers and so on.
Pandora has six components: Pandora Data Server, Pandora Network Server, Pandora SNMP Console, Pandora Agents, Pandora Database and Pandora Web Management System (Web Console).
Pandora Servers and SNMP Console
They are the recipient of bundles of information and the generators of alerts; they are the brain of the system. We can have several servers for very big systems or a single server. They are developed in Perl and works under any platform, with the required modules. Nevertheless its "official" platform is GNU/Linux. They also insert the gathered data into the Database. You can have several Pandora Servers connected with the same Database.
Pandora Web Console
It allows to manage the system and to operate with it; it's the user interface of Pandora. We can have several Web Consoles in the same implantation. It is developed in PHP and leans on a Data Base and a Web Server, being able to work in any platform: GNU/Linux, Solaris, Win2000, AIX and others.
Pandora Database
Core module of Pandora (as you can see in the architecture overview). In this database resides all the information of the enterprise, for example, all data gathered by agents, all configuration defined by administrator, all events, incidents, audit info... At this moment, only MySQL DataBase is supported. More Databases in the future.
Pandora Agents
They can monitor any numeric parameter, boolean states, strings or numerical incremental data and/or condition. They have a centralized architecture based on lightweight design for agents (shellscript, wsh, perl) and light agents to collect data. They support all type of platforms (Microsoft, AIX, Solaris, GNU/Linux, IPSO, FreeBSD, etc) because the agents are completely free software, and they communicate using SSH, FTP, NFS or other good way, using an XML container to transport data.
What do I need?
---------------
Perl, Perl Modules, MySQL, PHP, PHP Modules. See the Installation Documentation or go to http://pandora.sourceforge.net
License
-------
The project is distributed under the GPL License v2 or later.
Copyright (C) 2004-2006 Sancho Lerena.

View File

@ -1,8 +1,7 @@
Requirements
============
You need MD5 package to run Pandora Agent for HPUX. In this package was included a binary file for HPUX 11, dynamically compiled. If you dont want to install external binary files, please dont use checksum feature.
You need MD5 package to run Pandora Agent for HPUX with Data Integrity (this is now optional). In this package was included a binary file for HPUX 11, dynamically compiled. If you dont want to install external binary files, please dont use checksum feature.
MD5 pakage was created by RSA Data Security <jte@cert.org>, and distributed under the terms of GPL licence.
There are versions for HPUX 10.20, and source available at http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/md5-1.00/

View File

@ -0,0 +1,2 @@
Sancho Lerena <slerena@gmail.com>
Raul Mateos <raulofpandora@gmail.com>

View File

@ -0,0 +1,92 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too.
When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations.
Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and modification follow.
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program.
You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License.
c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program.
In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License.
7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.
10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS

View File

@ -0,0 +1,27 @@
Installing Pandora Agent in Unix systems
========================================
Pandora currently has agents for Linux, Solaris, AIX, HP-UX(*), and BSD (IPSO, FreeBSD, OpenBSD...) (*)
(*) Only Pandora Agent vesion 1.1, not version 1.2
Pandora Agent is a shell script that collects info from host machine, write in a XML file (called datafile), and send to the server using SSH (scp) or using any other way, like automated FTP.
There are two configuration files:
pandora_agent.conf
pandora_user.conf
A script file (the pandora agent)
pandora_agent.sh
And a startup script
pandora_agent_daemon
Pandora Agents use pandora_agent.conf to load initial data and load module data. Modules are atomic source of information. Please refer to Pandora Agents configuration - Quick Guide for more information.
pandora_user.conf is low level configuration. It will be executed in each iteration of pandora_agent.sh script. Please read it and see how it works.
There are a startup script called "pandora_agent_daemon" used to load Pandora Agent at boot time, and to stop ip. It depends on what type of Unix are you running. Test it before including it your init level script directory, it accepts start / stop / restart commands, like usual in Unix System V systems.

View File

@ -0,0 +1,41 @@
Pandora: The Free Distributed Monitoring System
===============================================
Version 1.2
What is Pandora DMS
-------------------
Pandora are a Free Software set of programs that allows to analyze in a visual way status and performance of several parameters from different Operating Systems, servers, applications and hardware systems as Firewalls, Proxies, Data Bases, Web Servers or Routers. All integrated into an open and distributed architecture.
Pandora can be deployed in every Operating System. You have an agent for every platform. Pandora can monitor hardware systems with TCP/IP Stack, as load balancers, routers, switches, printers and so on.
Pandora has six components: Pandora Data Server, Pandora Network Server, Pandora SNMP Console, Pandora Agents, Pandora Database and Pandora Web Management System (Web Console).
Pandora Servers and SNMP Console
They are the recipient of bundles of information and the generators of alerts; they are the brain of the system. We can have several servers for very big systems or a single server. They are developed in Perl and works under any platform, with the required modules. Nevertheless its "official" platform is GNU/Linux. They also insert the gathered data into the Database. You can have several Pandora Servers connected with the same Database.
Pandora Web Console
It allows to manage the system and to operate with it; it's the user interface of Pandora. We can have several Web Consoles in the same implantation. It is developed in PHP and leans on a Data Base and a Web Server, being able to work in any platform: GNU/Linux, Solaris, Win2000, AIX and others.
Pandora Database
Core module of Pandora (as you can see in the architecture overview). In this database resides all the information of the enterprise, for example, all data gathered by agents, all configuration defined by administrator, all events, incidents, audit info... At this moment, only MySQL DataBase is supported. More Databases in the future.
Pandora Agents
They can monitor any numeric parameter, boolean states, strings or numerical incremental data and/or condition. They have a centralized architecture based on lightweight design for agents (shellscript, wsh, perl) and light agents to collect data. They support all type of platforms (Microsoft, AIX, Solaris, GNU/Linux, IPSO, FreeBSD, etc) because the agents are completely free software, and they communicate using SSH, FTP, NFS or other good way, using an XML container to transport data.
What do I need?
---------------
Perl, Perl Modules, MySQL, PHP, PHP Modules. See the Installation Documentation or go to http://pandora.sourceforge.net
License
-------
The project is distributed under the GPL License v2 or later.
Copyright (C) 2004-2006 Sancho Lerena.

View File

@ -0,0 +1,7 @@
2006/07/06 18:44:43 - Reading general config parameters from .conf file
2006/07/06 18:44:43 - [SETUP] - Server IP Address is 192.168.50.100
2006/07/06 18:44:43 - [SETUP] - Server Path is /opt/pandora_server/data_in
2006/07/06 18:44:43 - [SETUP] - Temporal Path is /opt/pandora_agent/data_out
2006/07/06 18:44:43 - [SETUP] - Interval is 300 seconds
2006/07/06 18:44:43 - [SETUP] - Debug mode is 0
2006/07/06 18:44:43 - [SETUP] - Checksum is 0

View File

@ -6,14 +6,14 @@
# General Parameters
# ==================
server_ip localhost
server_ip 192.168.50.100
server_path /opt/pandora_server/data_in
pandora_path /opt/pandora_agent/
temporal /opt/pandora_agent/data_out
interval 1
debug 1
checksum 1
agent_name adama
interval 300
debug 0
checksum 0
#agent_name toher
# Module Definition
# =================
@ -29,15 +29,6 @@ module_min 0
module_descripcion User CPU Usage (%)
module_end
module_begin
module_name icmp_lat
module_type generic_data
module_exec ping 213.172.34.121 -c 2 -U | head -3 | tail -1 | grep -o -e "time=[0-9]*.[0-9]" | cut -d "=" -f 2
module_max 1000
module_min 0
module_description ICMP Latency for 213.172.34.121
module_end
module_begin
module_name cpu_sys
module_type generic_data
@ -60,13 +51,13 @@ module_end
module_begin
module_name memfree
module_type generic_data
module_exec cat /proc/meminfo | grep MemFree | cut -c 10-23
module_exec cat /proc/meminfo | grep MemFree | awk '{ print $2 }'
module_end
module_begin
module_name memused
module_type generic_data
module_exec cat /proc/meminfo | grep "Active" | cut -c 8- | cut -f 1 -d "k"
module_exec cat /proc/meminfo | grep "Active" | awk '{ print $2 }'
module_end
module_begin
@ -103,7 +94,7 @@ module_begin
module_name PandoraNet_Mem
module_description Pandora_Network Memory usage
module_type generic_data
module_exec ps aux | grep pandora_network | grep -v grep | awk '{ print $6 }'
module_exec ps aux | grep pandora_network.pl | grep -v grep | awk '{ print $6 }'
module_end
module_begin

View File

@ -7,7 +7,7 @@
# Este codigo esta licenciado bajo la licencia GPL 2.0.
# This code is licenced under GPL 2.0 licence.
# **********************************************************************
AGENT_VERSION=1.2beta2
AGENT_VERSION=1.2
IFS=$'\n'
# Begin cycle for adquire primary config tokens
@ -217,7 +217,7 @@ do
if [ -f "$PANDORA_HOME/pandora_user.conf" ]
then
/bin/bash $PANDORA_HOME/pandora_user.conf >> $DATA
/bin/bash $PANDORA_HOME/pandora_user.conf >> $DATA
fi
# Finish data packet

View File

@ -2,7 +2,7 @@
# Script de arranque de Agente Pandora
# Sancho Lerena, <slerena@gmail.com>
# Version para Linux (generico)
# v1.1
# v1.2
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin
PANDORA_PATH=/opt/pandora_agent/
@ -30,11 +30,15 @@ case "$1" in
stop)
if [ -f $PIDFILE ]
then
echo "Stopping Pandora Agent."
kill -9 `cat $PIDFILE`
rm -f $PIDFILE
echo "Stopping Pandora Agent."
PID_2=`cat $PIDFILE`
if [ ! -z "`ps -f -p $PID_2 | grep -v grep | grep 'pandora_agent'`" ]
then
kill -9 $PID_2
fi
rm -f $PIDFILE
else
echo "Pandora Agent is not running, cannot stop it. Aborting now..."
echo "Pandora Agent is not running, cannot stop it. Aborting now..."
fi
;;
force-reload|restart)

View File

@ -58,18 +58,18 @@
# on local interface ppp0
# ================================
#PLC_DNS=`dig @194.179.1.101 plc.genterara.com A +short | tail -1 `
#PLC_LOCAL=`ifconfig ppp0 | head -2 | tail -1 | tr -s ":" " " | awk ' { print $3 } '`
#if [ "$PLC_DNS" == "$PLC_LOCAL" ]
#then
# PLC_STATUS=1
#else
# PLC_STATUS=0
#fi
# PLC_DNS=`dig @194.179.1.101 plc.genterara.com A +short | tail -1 `
# PLC_LOCAL=`ifconfig ppp0 | head -2 | tail -1 | tr -s ":" " " | awk ' { print $3 } '`
# if [ "$PLC_DNS" == "$PLC_LOCAL" ]
# then
# PLC_STATUS=1
# else
# PLC_STATUS=0
# fi
#
#echo "<module>"
#echo "<name>PLC_DNS_CHECK</name>"
#echo "<type>generic_proc</type>"
#echo "<data>$PLC_STATUS</data>"
#echo "</module>"
# echo "<module>"
# echo "<name>PLC_DNS_CHECK</name>"
# echo "<type>generic_proc</type>"
# echo "<data>$PLC_STATUS</data>"
# echo "</module>"
# MODULE END ========================

View File

@ -0,0 +1,2 @@
Sancho Lerena <slerena@gmail.com>
Raul Mateos <raulofpandora@gmail.com>

View File

@ -0,0 +1,92 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too.
When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations.
Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and modification follow.
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program.
You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License.
c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program.
In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License.
7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.
10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS

View File

@ -0,0 +1,27 @@
Installing Pandora Agent in Unix systems
========================================
Pandora currently has agents for Linux, Solaris, AIX, HP-UX(*), and BSD (IPSO, FreeBSD, OpenBSD...) (*)
(*) Only Pandora Agent vesion 1.1, not version 1.2
Pandora Agent is a shell script that collects info from host machine, write in a XML file (called datafile), and send to the server using SSH (scp) or using any other way, like automated FTP.
There are two configuration files:
pandora_agent.conf
pandora_user.conf
A script file (the pandora agent)
pandora_agent.sh
And a startup script
pandora_agent_daemon
Pandora Agents use pandora_agent.conf to load initial data and load module data. Modules are atomic source of information. Please refer to Pandora Agents configuration - Quick Guide for more information.
pandora_user.conf is low level configuration. It will be executed in each iteration of pandora_agent.sh script. Please read it and see how it works.
There are a startup script called "pandora_agent_daemon" used to load Pandora Agent at boot time, and to stop ip. It depends on what type of Unix are you running. Test it before including it your init level script directory, it accepts start / stop / restart commands, like usual in Unix System V systems.

View File

@ -0,0 +1,41 @@
Pandora: The Free Distributed Monitoring System
===============================================
Version 1.2
What is Pandora DMS
-------------------
Pandora are a Free Software set of programs that allows to analyze in a visual way status and performance of several parameters from different Operating Systems, servers, applications and hardware systems as Firewalls, Proxies, Data Bases, Web Servers or Routers. All integrated into an open and distributed architecture.
Pandora can be deployed in every Operating System. You have an agent for every platform. Pandora can monitor hardware systems with TCP/IP Stack, as load balancers, routers, switches, printers and so on.
Pandora has six components: Pandora Data Server, Pandora Network Server, Pandora SNMP Console, Pandora Agents, Pandora Database and Pandora Web Management System (Web Console).
Pandora Servers and SNMP Console
They are the recipient of bundles of information and the generators of alerts; they are the brain of the system. We can have several servers for very big systems or a single server. They are developed in Perl and works under any platform, with the required modules. Nevertheless its "official" platform is GNU/Linux. They also insert the gathered data into the Database. You can have several Pandora Servers connected with the same Database.
Pandora Web Console
It allows to manage the system and to operate with it; it's the user interface of Pandora. We can have several Web Consoles in the same implantation. It is developed in PHP and leans on a Data Base and a Web Server, being able to work in any platform: GNU/Linux, Solaris, Win2000, AIX and others.
Pandora Database
Core module of Pandora (as you can see in the architecture overview). In this database resides all the information of the enterprise, for example, all data gathered by agents, all configuration defined by administrator, all events, incidents, audit info... At this moment, only MySQL DataBase is supported. More Databases in the future.
Pandora Agents
They can monitor any numeric parameter, boolean states, strings or numerical incremental data and/or condition. They have a centralized architecture based on lightweight design for agents (shellscript, wsh, perl) and light agents to collect data. They support all type of platforms (Microsoft, AIX, Solaris, GNU/Linux, IPSO, FreeBSD, etc) because the agents are completely free software, and they communicate using SSH, FTP, NFS or other good way, using an XML container to transport data.
What do I need?
---------------
Perl, Perl Modules, MySQL, PHP, PHP Modules. See the Installation Documentation or go to http://pandora.sourceforge.net
License
-------
The project is distributed under the GPL License v2 or later.
Copyright (C) 2004-2006 Sancho Lerena.

View File

@ -0,0 +1,2 @@
Sancho Lerena <slerena@gmail.com>
Raul Mateos <raulofpandora@gmail.com>

View File

@ -0,0 +1,92 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too.
When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations.
Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and modification follow.
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program.
You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License.
c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program.
In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License.
7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.
10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS

View File

@ -0,0 +1,27 @@
Installing Pandora Agent in Unix systems
========================================
Pandora currently has agents for Linux, Solaris, AIX, HP-UX(*), and BSD (IPSO, FreeBSD, OpenBSD...) (*)
(*) Only Pandora Agent vesion 1.1, not version 1.2
Pandora Agent is a shell script that collects info from host machine, write in a XML file (called datafile), and send to the server using SSH (scp) or using any other way, like automated FTP.
There are two configuration files:
pandora_agent.conf
pandora_user.conf
A script file (the pandora agent)
pandora_agent.sh
And a startup script
pandora_agent_daemon
Pandora Agents use pandora_agent.conf to load initial data and load module data. Modules are atomic source of information. Please refer to Pandora Agents configuration - Quick Guide for more information.
pandora_user.conf is low level configuration. It will be executed in each iteration of pandora_agent.sh script. Please read it and see how it works.
There are a startup script called "pandora_agent_daemon" used to load Pandora Agent at boot time, and to stop ip. It depends on what type of Unix are you running. Test it before including it your init level script directory, it accepts start / stop / restart commands, like usual in Unix System V systems.

View File

@ -0,0 +1,41 @@
Pandora: The Free Distributed Monitoring System
===============================================
Version 1.2
What is Pandora DMS
-------------------
Pandora are a Free Software set of programs that allows to analyze in a visual way status and performance of several parameters from different Operating Systems, servers, applications and hardware systems as Firewalls, Proxies, Data Bases, Web Servers or Routers. All integrated into an open and distributed architecture.
Pandora can be deployed in every Operating System. You have an agent for every platform. Pandora can monitor hardware systems with TCP/IP Stack, as load balancers, routers, switches, printers and so on.
Pandora has six components: Pandora Data Server, Pandora Network Server, Pandora SNMP Console, Pandora Agents, Pandora Database and Pandora Web Management System (Web Console).
Pandora Servers and SNMP Console
They are the recipient of bundles of information and the generators of alerts; they are the brain of the system. We can have several servers for very big systems or a single server. They are developed in Perl and works under any platform, with the required modules. Nevertheless its "official" platform is GNU/Linux. They also insert the gathered data into the Database. You can have several Pandora Servers connected with the same Database.
Pandora Web Console
It allows to manage the system and to operate with it; it's the user interface of Pandora. We can have several Web Consoles in the same implantation. It is developed in PHP and leans on a Data Base and a Web Server, being able to work in any platform: GNU/Linux, Solaris, Win2000, AIX and others.
Pandora Database
Core module of Pandora (as you can see in the architecture overview). In this database resides all the information of the enterprise, for example, all data gathered by agents, all configuration defined by administrator, all events, incidents, audit info... At this moment, only MySQL DataBase is supported. More Databases in the future.
Pandora Agents
They can monitor any numeric parameter, boolean states, strings or numerical incremental data and/or condition. They have a centralized architecture based on lightweight design for agents (shellscript, wsh, perl) and light agents to collect data. They support all type of platforms (Microsoft, AIX, Solaris, GNU/Linux, IPSO, FreeBSD, etc) because the agents are completely free software, and they communicate using SSH, FTP, NFS or other good way, using an XML container to transport data.
What do I need?
---------------
Perl, Perl Modules, MySQL, PHP, PHP Modules. See the Installation Documentation or go to http://pandora.sourceforge.net
License
-------
The project is distributed under the GPL License v2 or later.
Copyright (C) 2004-2006 Sancho Lerena.

View File

@ -1,13 +1,10 @@
Requirements
============
You need MD5 package (from Sunfreeware.com) to run Pandora Agent for Solaris
You need MD5 package (from Sunfreeware.com) to run Pandora Agent for Solaris if you want data checksum option (optional).
(ftp://ftp.sunfreeware.com/pub/freeware/sparc/8/md5-6142000-sol8-sparc-local.gz)
Install MD5 package
===================
@ -21,6 +18,11 @@ The following packages are available:
Select package(s) you wish to process (or 'all' to process
all packages). (default: all) [?,??,q]: 1
OpenSSH Install
===============
http://www.sunfreeware.com/openssh8.html
SSH Key generation procedure (F-Secure SSH only)
================================================

View File

@ -1,17 +1,17 @@
# Fichero de configuracion base de agentes de Pandora
# Base config file for Pandora agents
# Version 1.1, Solaris version
# Version 1.2, Solaris version
# General Parameters
# ==================
server_ip pandora_server
server_ip 192.168.50.100
server_path /opt/pandora_server/data_in
pandora_path /opt/pandora_agent/
temporal /opt/pandora_agent/data_out
interval 300
#agent_name satellite_system
checksum 0
debug 0
checksum 0
debug 1
# Module Definition
# =================
@ -32,6 +32,7 @@ module_begin
module_name disk_var_free
module_type generic_data
module_exec df -k | grep /var | tr -s "%" " " | tail -1 | awk '{ print 100 - $5 }'
module_interval 10
module_end
module_begin
@ -44,6 +45,7 @@ module_begin
module_name proctotal
module_type generic_data
module_exec ps -A | wc -l | awk '{ print $1 }'
module_interval 4
module_end
module_begin

View File

@ -1,15 +1,16 @@
#!/bin/sh
#!/usr/bin/ksh
# **********************************************************************
# Agente Generico Pandora
# Solaris version
# (c) Sancho Lerena 2003-2005, slerena@gmail.com
# Este codigo esta licenciado bajo la licencia GPL 2.0
# This code is licenced under GPL 2.0 licence.
# Pandora Agent for Solaris
# v1.2
# (c) Sancho Lerena 2003-2006, slerena@gmail.com
# Este codigo esta licenciado bajo la licencia GPL 2.0 o posterior
# This code is licenced under GPL 2.0 licence or later
# **********************************************************************
AGENT_VERSION=1.2a
AGENT_VERSION="1.2"
OLDIFS=$IFS
# Stupid trick to use IFS in Solaris ... doesnt work standard $'\n' :-?
# Stupid trick to use IFS in Solaris/AIX ... doesnt work standard $'\n' :-?
NEWIFS="
"
@ -18,196 +19,235 @@ TIMESTAMP=`date +"%Y/%m/%d %H:%M:%S"`
if [ -z "$1" ]
then
echo " "
echo "FATAL ERROR: I need an argument to PANDORA AGENT home path"
echo " "
echo " example: /opt/pandora_ng/pandora_agent.sh /opt/pandora_ng "
echo " "
exit
echo " "
echo "FATAL ERROR: I need an argument to PANDORA AGENT home path"
echo " "
echo " example: /opt/pandora_ng/pandora_agent.sh /opt/pandora_ng "
echo " "
exit
else
PANDORA_HOME=$1
PANDORA_HOME=$1
fi
if [ -z "`cat $PANDORA_HOME/pandora_agent.conf`" ]
then
echo " "
echo "FATAL ERROR: Cannot load $PANDORA_HOME/pandora_agent.conf"
echo " "
exit
echo " "
echo "FATAL ERROR: Cannot load $PANDORA_HOME/pandora_agent.conf"
echo " "
exit
fi
echo "$TIMESTAMP - Reading general config parameters from .conf file" >> $PANDORA_HOME/pandora.log
IFS=$NEWIFS
# Default values
DEBUG_MODE=0
CHECKSUM_MODE=1
CHECKSUM_MODE=0
IFS=$NEWIFS
for a in `cat $PANDORA_HOME/pandora_agent.conf | grep -v "^#" | grep -v "^module" `
do
a=`echo $a | tr -s " " " "`
# Get general configuration parameters from config file
if [ ! -z "`echo $a | grep '^server_ip'`" ]
then
SERVER_IP=`echo $a | awk '{ print $2 }' `
echo "$TIMESTAMP - [SETUP] - Server IP Address is $SERVER_IP" >> $PANDORA_HOME/pandora.log
fi
if [ ! -z "`echo $a | grep '^server_path'`" ]
then
SERVER_PATH=`echo $a | awk '{ print $2 }' `
echo "$TIMESTAMP - [SETUP] - Server Path is $SERVER_PATH" >> $PANDORA_HOME/pandora.log
fi
if [ ! -z "`echo $a | grep '^temporal'`" ]
then
TEMP=`echo $a | awk '{ print $2 }' `
echo "$TIMESTAMP - [SETUP] - Temporal Path is $TEMP" >> $PANDORA_HOME/pandora.log
fi
if [ ! -z "`echo $a | grep '^interval'`" ]
then
INTERVAL=`echo $a | awk '{ print $2 }' `
echo "$TIMESTAMP - [SETUP] - Interval is $INTERVAL seconds" >> $PANDORA_HOME/pandora.log
fi
if [ ! -z "`echo $a | grep '^agent_name'`" ]
then
NOMBRE_HOST=`echo $a | awk '{ print $2 }'`
echo "$TIMESTAMP - [SETUP] - Agent name is $NOMBRE_HOST " >> $PANDORA_HOME/pandora.log
fi
if [ ! -z "`echo $a | grep '^debug'`" ]
then
DEBUG_MODE=`echo $a | awk '{ print $2 }'`
echo "$TIMESTAMP - [SETUP] - Debug mode is $DEBUG_MODE " >> $PANDORA_HOME/pandora.log
fi
if [ ! -z "`echo $a | grep '^checksum'`" ]
then
CHECKSUM_MODE=`echo $a | awk '{ print $2 }'`
echo "$TIMESTAMP - [SETUP] - Checksum mode is $CHECKSUM_MODE " >> $PANDORA_HOME/pandora.log
fi
a=`echo $a | tr -s " " " "`
# Get general configuration parameters from config file
if [ ! -z "`echo $a | grep '^server_ip'`" ]
then
SERVER_IP=`echo $a | awk '{ print $2 }'`
echo "$TIMESTAMP - [SETUP] - Server IP Address is $SERVER_IP" >> $PANDORA_HOME/pandora.log
fi
if [ ! -z "`echo $a | grep '^server_path'`" ]
then
SERVER_PATH=`echo $a | awk '{ print $2 }'`
echo "$TIMESTAMP - [SETUP] - Server Path is $SERVER_PATH" >> $PANDORA_HOME/pandora.log
fi
if [ ! -z "`echo $a | grep '^temporal'`" ]
then
TEMP=`echo $a | awk '{ print $2 }'`
echo "$TIMESTAMP - [SETUP] - Temporal Path is $TEMP" >> $PANDORA_HOME/pandora.log
fi
if [ ! -z "`echo $a | grep '^interval'`" ]
then
INTERVAL=`echo $a | awk '{ print $2 }'`
echo "$TIMESTAMP - [SETUP] - Interval is $INTERVAL seconds" >> $PANDORA_HOME/pandora.log
fi
if [ ! -z "`echo $a | grep '^agent_name'`" ]
then
NOMBRE_HOST=`echo $a | awk '{ print $2 }' `
echo "$TIMESTAMP - [SETUP] - Agent name is $NOMBRE_HOST " >> $PANDORA_HOME/pandora.log
fi
if [ ! -z "`echo $a | grep '^debug'`" ]
then
DEBUG_MODE=`echo $a | awk '{ print $2 }' `
echo "$TIMESTAMP - [SETUP] - Debug mode $DEBUG_MODE " >> $PANDORA_HOME/pandora.log
fi
if [ ! -z "`echo $a | grep '^checksum'`" ]
then
CHECKSUM_MODE=`echo $a | awk '{ print $2 }' `
echo "$TIMESTAMP - [SETUP] - Checksum mode is $CHECKSUM_MODE " >> $PANDORA_HOME/pandora.log
fi
done
# MAIN Program loop begin
# OS Data
OS_VERSION=`uname -r`
OS_VERSION=`uname -v`
OS_VERSION=$OS_VERSION.`uname -r`
OS_NAME=`uname -s`
# Hostname
if [ -z "$NOMBRE_HOST" ]
then
NOMBRE_HOST=`/bin/hostname`
NOMBRE_HOST=`/bin/hostname`
fi
# Default values
CONTADOR=0
EXECUTE=1
MODULE_END=0
while [ "1" = "1" ]
do
CONTADOR=`expr $CONTADOR + 1`
# Fecha y hora. Se genera un serial (numero de segundos desde 1970) para cada paquete generado.
TIMESTAMP=`date +"%Y/%m/%d %H:%M:%S"`
SERIAL=$CONTADOR
# Nombre de los archivos
DATA=$TEMP/$NOMBRE_HOST.$SERIAL.data
CHECKSUM=$TEMP/$NOMBRE_HOST.$SERIAL.checksum
PANDORA_FILES="$TEMP/$NOMBRE_HOST.$SERIAL.*"
# Fecha y hora. Se genera un serial (numero de segundos desde 1970) para cada paquete generado.
TIMESTAMP=`date +"%Y/%m/%d %H:%M:%S"`
SERIAL=`date +"%S%M%m%H"`
# Nombre de los archivos
DATA=$TEMP/$NOMBRE_HOST.$SERIAL.data
CHECKSUM=$TEMP/$NOMBRE_HOST.$SERIAL.checksum
PANDORA_FILES="$TEMP/$NOMBRE_HOST.$SERIAL.*"
DATA2=$TEMP/$NOMBRE_HOST.$SERIAL.data_temp
# Makes data packet
echo "<agent_data os_name='$OS_NAME' os_version='$OS_VERSION' interval='$INTERVAL' version='$AGENT_VERSION' timestamp='$TIMESTAMP' agent_name='$NOMBRE_HOST'>" > $DATA
if [ "$DEBUG_MODE" = "1" ]
then
echo "$TIMESTAMP - Reading module adquisition data from .conf file" >> $PANDORA_HOME/pandora.log
# Makes data packet
echo "<agent_data os_name='$OS_NAME' os_version='$OS_VERSION' interval='$INTERVAL' version='$AGENT_VERSION' timestamp='$TIMESTAMP' agent_name='$NOMBRE_HOST'>" > $DATA
if [ "$DEBUG_MODE" = "1" ]
then
echo "$TIMESTAMP - Reading module adquisition data from .conf file" >> $PANDORA_HOME/pandora.log
DEBUGOUTPUT=$PANDORA_HOME/pandora.log
else
DEBUGOUTPUT=/dev/null
fi
for a in `cat $PANDORA_HOME/pandora_agent.conf | grep -v "^#" | grep "^module" `
do
a=`echo $a | tr -s " " " "`
if [ ! -z "`echo $a | grep '^module_exec'`" ]
then
if [ $EXECUTE -eq 0 ]
then
execution=`echo $a | cut -c 13-`
res=`eval $execution 2> /dev/null`
if [ -z "$flux_string" ]
then
res=`eval expr $res 2> /dev/null`
fi
echo "<data>$res</data>" >> $DATA2
fi
fi
for a in `cat $PANDORA_HOME/pandora_agent.conf | grep -v "^#" | grep "^module" `
do
a=`echo $a | tr -s " " " "`
if [ ! -z "`echo $a | grep '^module_exec'`" ]
then
execution=`echo $a | cut -c 13-`
res=`eval $execution`
if [ -z "$flux_string" ]
then
res=`eval expr $res`
fi
echo "<data>$res</data>" >> $DATA
fi
if [ ! -z "`echo $a | grep '^module_name'`" ]
then
name=`echo $a | cut -c 13-`
echo "<name>$name</name>" >> $DATA2
fi
if [ ! -z "`echo $a | grep '^module_name'`" ]
then
name=`echo $a | cut -c 13-`
echo "<name>$name</name>" >> $DATA
fi
if [ ! -z "`echo $a | grep '^module_begin'`" ]
then
echo "<module>" >> $DATA2
EXECUTE=0
fi
if [ ! -z "`echo $a | grep '^module_begin'`" ]
then
echo "<module>" >> $DATA
fi
if [ ! -z "`echo $a | grep '^module_max' `" ]
then
max=`echo $a | awk '{ print $2 }' `
echo "<max>$max</max>" >> $DATA2
fi
if [ ! -z "`echo $a | grep '^module_min'`" ]
then
min=`echo $a | awk '{ print $2 }' `
echo "<min>$min</min>" >> $DATA2
fi
if [ ! -z "`echo $a | grep '^module_description'`" ]
then
desc=`echo $a | cut -c 20- `
echo "<description>$desc</description>" >> $DATA2
fi
if [ ! -z "`echo $a | grep '^module_max' `" ]
then
max=`echo $a | awk '{ print $2 }' `
echo "<max>$max</max>" >> $DATA
fi
if [ ! -z "`echo $a | grep '^module_min'`" ]
then
min=`echo $a | awk '{ print $2 }' `
echo "<min>$min</min>" >> $DATA
fi
if [ ! -z "`echo $a | grep '^module_description'`" ]
then
desc=`echo $a | cut -c 20- `
echo "<description>$desc</description>" >> $DATA
fi
if [ ! -z "`echo $a | grep '^module_end'`" ]
then
echo "</module>" >> $DATA
fi
if [ ! -z "`echo $a | grep '^module_end'`" ]
then
MODULE_END=1
echo "</module>" >> $DATA2
else
MODULE_END=0
fi
if [ ! -z "`echo $a | grep '^module_type'`" ]
then
mtype=`echo $a | cut -c 13-`
if [ ! -z "`echo $mtype | grep 'generic_data_string'`" ]
then
flux_string=1
else
flux_string=0
unset flux_string
if [ ! -z "`echo $a | grep '^module_type'`" ]
then
mtype=`echo $a | cut -c 13-`
if [ ! -z "`echo $mtype | grep 'generic_data_string'`" ]
then
flux_string=1
else
flux_string=0
unset flux_string
fi
echo "<type>$mtype</type>" >> $DATA
fi
done
echo "<type>$mtype</type>" >> $DATA2
fi
if [ ! -z "`echo $a | grep '^module_interval'`" ]
then
# Determine if execution is to be done
MODULEINTERVAL=`echo $a | awk '{ print $2 }'`
EXECUTE=`expr \( $CONTADOR + 1 \) % $MODULEINTERVAL`
fi
# Call for user-defined script for data adquisition
# If module end, and execute for this module is enabled
# then write
if [ $MODULE_END -eq "1" ]
then
if [ $EXECUTE -eq "0" ]
then
cat $DATA2 >> $DATA
fi
rm -Rf $DATA2 #> /dev/null 2> /dev/null
fi
if [ -f "$PANDORA_HOME/pandora_user.conf" ]
then
/bin/sh $PANDORA_HOME/pandora_user.conf >> $DATA
fi
done
# Finish data packet
echo "</agent_data>" >> $DATA
if [ "$DEBUG_MODE" = "1" ]
then
echo "$TIMESTAMP - Finish writing XML $DATA" >> $PANDORA_HOME/pandora.log
fi
# Count number of agent runs
CONTADOR=`expr $CONTADOR + 1`
# Keep a limit of 100 for overflow reasons
if [ $CONTADOR -eq 100 ]
then
CONTADOR=0
fi
# Calculate Checksum and prepare MD5 file
if [ "$CHECKSUM_MODE" = "1" ]
then
CHECKSUM_DATA=`cat $DATA | /usr/local/bin/md5 `
else
CHECKSUM_DATA="No valid checksum"
fi
echo $CHECKSUM_DATA $DATA> $CHECKSUM
# Send packets to server and detele it
scp $PANDORA_FILES pandora@$SERVER_IP:$SERVER_PATH > /dev/null 2> /dev/null
if [ "$DEBUG_MODE" = "1" ]
then
echo "$TIMESTAMP - Copying $PANDORA_FILES to $SERVER_IP:$SERVER_PATH" >> $PANDORA_HOME/pandora.log
echo "Pandora Agent in debug mode. Exitting now"
exit
fi
rm -f $PANDORA_FILES> /dev/null
sleep $INTERVAL
# Call for user-defined script for data adquisition
if [ -f "$PANDORA_HOME/pandora_user.conf" ]
then
/bin/sh $PANDORA_HOME/pandora_user.conf >> $DATA 2> /dev/null
fi
# Finish data packet
echo "</agent_data>" >> $DATA
echo "$TIMESTAMP - Finish writing XML $DATA" >> $DEBUGOUTPUT
# Calculate Checksum and prepare MD5 file
if [ "$CHECKSUM_MODE" = 1 ]
then
CHECKSUM_DATA=`cat $DATA | md5 `
echo $CHECKSUM_DATA $DATA> $CHECKSUM
else
echo "NO MD5 CHECKSUM AVAILABLE" > $CHECKSUM
fi
# Send packets to server and delete it
scp $PANDORA_FILES pandora@$SERVER_IP:$SERVER_PATH
if [ "$DEBUG_MODE" = 1 ]
then
echo "$TIMESTAMP - DEBUG :Copying $PANDORA_FILES to $SERVER_IP:$SERVER_PATH" >> $PANDORA_HOME/pandora.log
else
# Delete it
rm -f $PANDORA_FILES> /dev/null
fi
# Go to bed :-)
sleep $INTERVAL
done
# forever!

View File

@ -1,8 +1,9 @@
#!/bin/sh
# Script de arranque de Agente Pandora
#!/usr/bin/ksh
# Startup Script for Pandora Agent
# Sancho Lerena, <slerena@gmail.com>
# Version para Solaris
# v1.1
# v1.2
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin
PANDORA_PATH=/opt/pandora_agent/
@ -23,15 +24,19 @@ case "$1" in
echo "Pandora Agent is currently running on this machine. Aborting now..."
exit
fi
$PANDORA_PATH/$DAEMON $PANDORA_PATH >> $PANDORA_PATH/pandora.log & MYPID=$!
$PANDORA_PATH/$DAEMON $PANDORA_PATH >> $PANDORA_PATH/pandora.log & MYPID=$!
echo $MYPID > $PIDFILE
echo "Pandora Agent is now running with PID $MYPID"
;;
stop)
if [ -f $PIDFILE ]
then
echo "Stopping Pandora Agent."
kill -9 `cat $PIDFILE`
echo "Stopping Pandora Agent."
PID_2=`cat $PIDFILE`
if [ ! -z "`ps -f -p $PID_2 | grep -v grep | grep 'pandora_agent'`" ]
then
kill -9 $PID_2
fi
rm -f $PIDFILE
else
echo "Pandora Agent is not running, cannot stop it. Aborting now..."

View File

@ -9,21 +9,3 @@
#
# Please refer documentatation for more example and a more depth usage instructions
#
# a little example, to monitor changes on DNS versus actual IP on interface ppp0
# Uncomment below this line to execute. All output needs to be in Pandora XML Agent-Output format
#PLC_DNS=`dig @194.179.1.101 plc.genterara.com A +short | tail -1 `
#PLC_LOCAL=`ifconfig ppp0 | head -2 | tail -1 | tr -s ":" " " | awk ' { print $3 } '`
#if [ "$PLC_DNS" == "$PLC_LOCAL" ]
#then
# PLC_STATUS=1
#else
# PLC_STATUS=0
#fi
#
#echo "<module>"
#echo "<name>PLC_DNS_CHECK</name>"
#echo "<type>generic_proc</type>"
#echo "<data>$PLC_STATUS</data>"
#echo "</module>"

View File

@ -1,3 +1,14 @@
2006-07-05 Sancho Lerena <slerena@artica.es>
* INSTALL, COPYNG: Added to repository
* util/ : Added GNU Tools to repository.
* libeay32.dll, zlib1.dll: Added to repository.
* pandora_agent.conf: Some changes to example config file. Added some
examples to reflect a more "real" setup.
2006-07-05 Esteban Sanchez <esteban@steve-o.org>
* README: Style correction.

View File

@ -23,15 +23,16 @@ agent_name vmware_sancho
# =================
# Monitorizacion Netstat
# Counting OpenedConnections (check the language string)
module_begin
module_name Conexiones abiertas
module_type generic_data_string
module_exec netstat -na | grep LISTEN
module_name OpenNetConnections
module_type generic_data
module_exec netstat -na | grep ESTAB | wc -l | tr -d " "
module_description Conexiones abiertas (interval 2)
module_interval 2
module_end
# Is Schedule service running ?
module_begin
module_name ServicioProg
module_type generic_proc
@ -39,6 +40,7 @@ module_service Schedule
module_description Servicio Programador de tareas
module_end
# Is Eventlog service running ?
module_begin
module_name ServicioReg
module_type generic_proc
@ -46,3 +48,18 @@ module_service Eventlog
module_description Servicio Registro de sucesos
module_end
# Is lsass.exe process alive ?
module_begin
module_name Proc_lsass
module_type generic_proc
module_proc "lsass.exe"
module_description Proceso LSASS.exe
module_end
# Received packets
module_begin
module_name ReceivedPackets
module_type generic_data
module_exec netstat -s | grep "Paquetes recibidos "| tr -d " " | cut -f 2 -d "=" | tr -d "\n"
module_description Conexiones abiertas (interval 2)
module_end

Binary file not shown.