* Preparing the package for release Beta2 officially.
* Better implementation of configuration file. Now supports also relative paths. More easy to distribute a default config based on base path (thanks to Esteban). * Updated README and INSTALL documents (also in console directory). * Added COPYING (GPL2). * Added AUTHORS. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@78 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
1a24d322ad
commit
7b849d903d
|
@ -0,0 +1 @@
|
|||
Sancho Lerena <slerena@gmail.com>
|
|
@ -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
|
|
@ -0,0 +1,238 @@
|
|||
Pandora Server install
|
||||
======================
|
||||
|
||||
This small document try to guide you to a quick-and-irresponsable install. You must read the full install guide before try to install Pandora server and run it, but if you only want a quick step guide, this document is for you.
|
||||
|
||||
Requisites
|
||||
==========
|
||||
|
||||
Database
|
||||
~~~~~~~~
|
||||
MySQL v4.x (or higher) database is used by Pandora Server as data storage. Only MySQL is supported by Pandora. InnoDB support is required, so you have to install MySQL4 or higher. If you want a MySQL cluster, use MySQL5. There are info about how to setup Pandora in a cluster enviroments.
|
||||
|
||||
Pandora Data Server
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
Requires SSH Servr and Perl v5.8 or higher and the next Perl Modules:
|
||||
|
||||
XML::Simple, useful XML functions
|
||||
Digest::MD5, MD5 generation
|
||||
Time::Local, Date and Time basic manipulation
|
||||
DBI, DB interface with MySQL
|
||||
Date::Manip, needed to manipulate Date and Time formats of input, output and compare
|
||||
|
||||
You can find them at http://www.cpan.org or install using your default package instalation system. These packages are in the default distribution of Suse 9.1 and Debian 3.0 GNU/Linux. Also available for Solaris in CPAN repository. If you use Windows go to http://ppm.activestate.com. Or you can use the ppm tool to download the modules:
|
||||
ppm install DBI
|
||||
ppm install DBD-mysql
|
||||
ppm install Datemanip
|
||||
|
||||
Next, you need to set the TZ (Time Zone) environment variable. In Windows: set TZ=WET (for example).
|
||||
|
||||
Pandora Network Server
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
Requires SSH Server and Perl v5.8 or higher and the next Perl Modules:
|
||||
|
||||
IO::Socket, manage and manipulation of TCP/UDP sockets
|
||||
Time::HiRes, needed for ICMP times
|
||||
Time::Local, Date and Time basic manipulation
|
||||
Net::Ping, to calculate latency times (it's required that the server runs as root user).
|
||||
Net::Ping::External, needed to "ping" to remote systems
|
||||
SNMP, for SNMP management
|
||||
Date::Manip, needed to manipulate Date and Time formats of input, output and compare
|
||||
|
||||
To use SNMP fuctions it's needed also to have installed the net-snmp package. It's worth to say that to run modules of GENERIC_ICMP_DATA type (calculate ICMP latency time) Pandora Network Server must run with root privileges.
|
||||
|
||||
Pandora SNMP Console
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
It's needed to install the NET-SNMP package which is included in all GNU/Linux distributions. You have to use the snmptrapd binary and copy or link it to $HOME_PANDORA/util, where $HOME_PANDORA is the instalation directory of Pandroa Server. This usually is /opt/pandora_server.
|
||||
|
||||
This binary gets the SNMP traps, generating a log that is parsed by the Pandora Server.
|
||||
|
||||
Pandora Web Console
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
Requires a Web Server (Apache recommended) with PHP 4.3.x (PHP 5 works ok too), PHP4-MySQL and PHP4-session modules, PHP-GD v1.3 library and JpGraph (http://www.aditus.nu/jpgraph/) for graphic generation.
|
||||
|
||||
It's required to initialize session on request startup to include on /etc/php.ini (or similar, depends on OS) the lines:
|
||||
session.bug_compat_42 = 1
|
||||
|
||||
For security, the transfer of data between Pandora Agents and Server it's recommended to use SSHv2 using SCP, so you need to install it on your systems. You can also use SSHv1, FTP, TFTP or TCP/Raw transfers, but this last procedure isn't included in the Pandora documentation.
|
||||
|
||||
Pandora Agents
|
||||
~~~~~~~~~~~~~~
|
||||
These are installed on every machine to be monitored. They depend on the Operating System. Clients for several OS are provided, but can be easily developed new ones.
|
||||
|
||||
Pandora Agents for Solaris and AIX
|
||||
|
||||
You need MD5 package to run Pandora Agent for Solaris and AIX, but it's possible to deactivate the check into the servers and agents, setting the checksum to 0 inside the agent's configuration file (pandora_agent.conf).
|
||||
Installation
|
||||
|
||||
INSTALLATION
|
||||
============
|
||||
|
||||
Download the packages Pandora Server for Pandora Data Server, Pandora Network Server and Pandora SNMP Console, Pandora Agents and Pandora Web Console for DataBase and Web Management System (Web Console).
|
||||
|
||||
Database
|
||||
~~~~~~~~
|
||||
You need a database with name "pandora". To create the structure of Pandora database in MySQL Server you have the SQL script pandoradb.sql inside Pandora WebConsole distribution. It creates tables and indexes needed to insert information into Pandora database.
|
||||
|
||||
You MUST populate database with pandoradb_data.sql, an SQL script included in the same distribution directory, that inserts data needed to run Web Console and default user (login: admin, password: pandora) to access Pandora Web Console.
|
||||
|
||||
To install the files, first create a database called "pandora", and set an user to be able to access this database:
|
||||
mysql> create database pandora;
|
||||
|
||||
Later, execute the next commands using a user with enough privileges to create tables and indexes into Pandora Database into your MySQL Server:
|
||||
cat pandoradb.sql | mysql -D pandora -u root -p
|
||||
cat pandoradb_data.sql | mysql -D pandora -u root -p
|
||||
|
||||
Note: if your system is Windows, use the command type instead of cat.
|
||||
|
||||
You can also use the source command, if you are connected to MySQL, from the MySQL prompt:
|
||||
mysql> use pandora;
|
||||
mysql> source <path_to_pandoradb.sql>
|
||||
mysql> source <path_to_pandoradb_data.sql>
|
||||
|
||||
This example is valid using root user in MySQL. Remember if you're in windows and you use MySQL v4.1, use the dobule slash ("//") with the path to the files, not the backslash ("\").
|
||||
|
||||
If you have any problem with this commands, from the OS command line you can run this commands:
|
||||
cat pandoradb.sql | mysql -D pandora -u root -p
|
||||
cat pandoradb_data.sql | mysql -D pandora -u root -p
|
||||
|
||||
Note: if you're using Windows, you must use type command instead of the cat one.
|
||||
|
||||
Now we will create an user "pandora" and will be given to it privileges from the localhost. Please look at MySQL install & management guide (http://dev.mysql.com/doc) to obtain information about how to create a MySQL user and give him/her privileges to read/write in Pandora database. The sentence will be something like:
|
||||
mysql> grant all on pandora.* to 'pandora'@'localhost' identified by 'pandora';
|
||||
|
||||
Keep in mind that users need access from Pandora WEB Console and from Pandora Server, if your deployment has many subcomponents in different physical machines, you need to setup a MySQL user with privileges to access from different locations.
|
||||
|
||||
If you get the error "Warning: mysql_connect() [function.mysql-connect]: client does not support authentication protocol requested by server; consider upgrading" when authenticating Web Console, you have to change the way the password is stored into the database (see FAQ):
|
||||
mysql> set password for 'pandora'@'localhost' = old_password('pandora');
|
||||
|
||||
Please note this user will be used by several Pandora subcomponents(Pandora Server, Pandora Web Console) to access database.
|
||||
|
||||
Dont forget to flush privileges before exiting mysql console:
|
||||
|
||||
flush privileges;
|
||||
|
||||
Pandora Server
|
||||
~~~~~~~~~~~~~~
|
||||
|
||||
Create the /opt/pandora directory and "gunzip" and "untar" here the pandora_server_1.2beta1.tar.gz file.
|
||||
|
||||
Create an user pandora in OS. Usually you do that (in GNU/Linux) with commands:
|
||||
useraddd pandora -d /home/pandora
|
||||
mkdir /home/pandora
|
||||
chown pandora /home/pandora
|
||||
|
||||
This user will be used by the SSH transfers to the server, so this user will need a strong password.
|
||||
|
||||
In the file /home/pandora/.ssh/authorized_keys we will add the public key of each agent which send data to Pandora Server. These keys must be SSH v2, OpenSSH DiffieHellman (DF) or RSA. To convert between keys you can use the ssh-keygen tool.
|
||||
|
||||
Pandora Server will check and parse XML files sent by Pandora Agents and will insert the data into the Database.
|
||||
|
||||
Check launch scripts (pandora_network, pandora_server, pandora_snmp) and check for pathnames in the first two variables in script.
|
||||
|
||||
Edit configuration file of Pandora Server, usually /opt/pandora/conf/pandora_server.conf and take a look at the lines:
|
||||
dbuser pandora
|
||||
dbpass pandora
|
||||
dbhost localhost
|
||||
|
||||
Please change them to your own data. For security reasons isn't recommended use the default values.
|
||||
|
||||
Before running Pandora Server, you need to have Pandora DataBase running. In order to setup database configuration you'll need to edit pandora_server.pl perl script and change this parameters (all are together, in the first lines of code):
|
||||
my $dirname = "/opt/pandora/data_in";
|
||||
my $dbuser = "pandora";
|
||||
my $dbpass = "pandora";
|
||||
my $dbhost = "pandora";
|
||||
my $log_file = "/opt/pandora/pandora.log";
|
||||
|
||||
If you run Pandora Server in Windows, you need to use the backslash twice in $dirname, that is: "\\", for example: my $dirname="C:\\pandora\\pandora_server\\data_in";, not needed in $log_file.
|
||||
|
||||
These are default values, and all must be existing directory and filename and valid username, password and hostname.
|
||||
|
||||
Remember: you need to create the directory /opt/pandora/data_in where Pandora Server will read and write data, sent by remote agents using ssh/scp. This directory must be owned or with permissions to write for user "pandora". If you dont have a "pandora" user yet, create it.
|
||||
|
||||
You can run Pandora Server with an user without privilegues, you can use the user "pandora", it only needs to run /usr/bin/perl and access to /opt/pandora and /opt/pandora/data_in directories.
|
||||
|
||||
This is true with all the components but with Pandora SNMP Console needs root user to open UDP port 161 (this can be solved setting SUID0 to the snmptrapd binary) and running the rest of the Server using an user without privileges.
|
||||
|
||||
Also Pandora Network Server can be run using an user without privileges, but the GENERIC_ICMP_DATA type won't work, as root privileges are required to get ICMP latency times.
|
||||
|
||||
Check the MySQL connection with the user and password before running the server
|
||||
|
||||
Pandora Server distribution tarball includes a Posix/System V start/stop script for "daemonize" Pandora Server. It is possible that you need to customize, but its runs smoothly on GNU/Linux (debian, Suse) and Solaris 8 systems. It has start|stop|restart parameters to include it in your default init level directory and it creates a logfile defined in $log_file variable (by default is /opt/pandora/pandora.log):
|
||||
/etc/init.d/pandora_server start
|
||||
|
||||
Pandora Web Console
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The only file you need to modify is include/config.php, where the following variables are included in .php code:
|
||||
$dbname="pandora"; // name of database for pandora (default: pandora)
|
||||
$dbuser="pandora"; // mysql user to access pandora database
|
||||
$dbpassword="pandora"; // Password for mysql user to access pandora database
|
||||
$dbhost="pandora"; // Hostname or IP where mySQL server runs
|
||||
|
||||
If database is defined and was correctly installed, you can now access:
|
||||
http://<hostname_pandora_webconsole>:<port>/<installation_directory>/index.php
|
||||
|
||||
The first time you log there is a default admin user "admin" and password "pandora". It's worth to say that you MUST CHANGE CREDENTIALS BEFORE LOGIN FIRST TIME, change it or create another account, disabling this one.
|
||||
|
||||
Pandora Agents for Unix
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
There are two configuration files:
|
||||
pandora_agent.conf
|
||||
pandora_user.conf (only in Unix)
|
||||
|
||||
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 v1.1 file or 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 one or more daemon scripts to load pandora_agent.sh at boot time. It depends on what type of Unix are you running. One of them is pandora_agent_daemon_generic which is a "supposed" multiplattform sh script to start/stop pandora_agent script. Rename it by /etc/init.d/pandora_agent and test it before including it your init level script directory.
|
||||
|
||||
SNMP Troubleshooting
|
||||
====================
|
||||
|
||||
You need to install libsnmp-perl package (debian name) to use SNMP Network Agents.
|
||||
|
||||
On PERL code for Pandora Server:
|
||||
|
||||
If problems occur there are number areas to look at to narrow down the possibilities.
|
||||
The first step should be to test the UCD SNMP installation independently from the Perl5 SNMP interface.
|
||||
Try running the apps from the UCD SNMP distribution, this means: try to exec manually snmpget in the Pandora Network Server. Try for example:
|
||||
|
||||
snmpget -v 1 -c public 192.168.5.1 SNMPv2-MIB::sysName.0
|
||||
bash: snmpget: command not found
|
||||
|
||||
Houston, you've a problem with snmpget :-). Fix it before launch pandora network server.
|
||||
|
||||
Make sure your agent (snmpd) is running and properly configured with read-write access for the community you are using.
|
||||
Ensure that your MIBs are installed and enviroment variables are set appropriately (see man mib_api)
|
||||
Be sure to remove old ucd-snmp installations and ensure headers and libraries from old CMU installations are not being used by mistake.
|
||||
|
||||
If the problem occurs during compilation/linking check that the snmp library being linked is actually the UCD SNMP library (there have been name conflicts with existing snmp libs).
|
||||
Also check that the header files are correct and up to date.
|
||||
Sometimes compiling the UCD SNMP library with 'position-independent-code' enabled is required (HPUX specifically).
|
||||
|
||||
Network Agent: ICMP Latency
|
||||
===========================
|
||||
|
||||
This module only works if Network Server component its executed under root privileges due limitations of Net::Ping perl library. You can run Network Server using an user without admin privileges but you cannot use ICMP Data / Latency module, but ICMP Proc it's usable using any user because other perl library it's used in this case.
|
||||
|
||||
Network Agent: UDP
|
||||
==================
|
||||
|
||||
This module only works if Network Server component its executed under root privileges due limitations of Net::Ping perl library.
|
||||
|
||||
Network Agent chat
|
||||
==================
|
||||
|
||||
Its possible to send data to remote TCP ports in Network Agents, you can use "^M" macro to replace \r\n (Return Carriage and Line Feed), for example, to use a simple http request: "GET / HTTP/1.0^M^M".
|
||||
|
||||
remote_tcp_proc moduletype allows you to "expect" a string (rcv data). If this string is matched in any place of the answer, value will be 1 (OK), if not, 0 (BAD).
|
||||
|
||||
Network SNMP Agent
|
||||
==================
|
||||
|
||||
SNMP OID MUST be provided in dotted format, p.e:
|
||||
|
||||
IF-MIB::ifInOctets.6 -> .1.3.6.1.2.1.2.2.1.16.6
|
||||
|
||||
SNMPv2-MIB::sysUpTime -> .1.3.6.1.2.1.1.3
|
|
@ -1,54 +1,41 @@
|
|||
Configure
|
||||
=========
|
||||
Change the values in the ./conf/pandora_server.conf file to your own values: servername, IP and so.
|
||||
Pandora: The Free Distributed Monitoring System
|
||||
===============================================
|
||||
|
||||
Version 1.2
|
||||
|
||||
SNMP Troubleshooting
|
||||
====================
|
||||
What is Pandora DMS
|
||||
-------------------
|
||||
|
||||
You need to install libnet-snmp-perl (not the old libsnmp-perl) package (debian name) to use SNMP Network Agents.
|
||||
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.
|
||||
|
||||
On PERL code for Pandora Server:
|
||||
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.
|
||||
|
||||
If problems occur there are number areas to look at to narrow down the possibilities.
|
||||
The first step should be to test the UCD SNMP installation independently from the Perl5 SNMP interface.
|
||||
Try running the apps from the UCD SNMP distribution, this means: try to exec manually snmpget in the Pandora Network Server. Try for example:
|
||||
Pandora has six components: Pandora Data Server, Pandora Network Server, Pandora SNMP Console, Pandora Agents, Pandora Database and Pandora Web Management System (Web Console).
|
||||
|
||||
snmpget -v 1 -c public 192.168.5.1 SNMPv2-MIB::sysName.0
|
||||
bash: snmpget: command not found
|
||||
Pandora Servers and SNMP Console
|
||||
|
||||
Houston, you've a problem with snmpget :-). Fix it before launch pandora network server.
|
||||
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.
|
||||
|
||||
Make sure your agent (snmpd) is running and properly configured with read-write access for the community you are using.
|
||||
Ensure that your MIBs are installed and enviroment variables are set appropriately (see man mib_api)
|
||||
Be sure to remove old ucd-snmp installations and ensure headers and libraries from old CMU installations are not being used by mistake.
|
||||
Pandora Web Console
|
||||
|
||||
If the problem occurs during compilation/linking check that the snmp library being linked is actually the UCD SNMP library (there have been name conflicts with existing snmp libs).
|
||||
Also check that the header files are correct and up to date.
|
||||
Sometimes compiling the UCD SNMP library with 'position-independent-code' enabled is required (HPUX specifically).
|
||||
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.
|
||||
|
||||
Network Agent: ICMP Latency
|
||||
===========================
|
||||
Pandora Database
|
||||
|
||||
This module only works if Network Server component its executed under root privileges due limitations of Net::Ping perl library. You can run Network Server using an user without admin privileges but you cannot use ICMP Data / Latency module, but ICMP Proc it's usable using any user because other perl library it's used in this case.
|
||||
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.
|
||||
|
||||
Network Agent: UDP
|
||||
==================
|
||||
Pandora Agents
|
||||
|
||||
This module only works if Network Server component its executed under root privileges due limitations of Net::Ping perl library.
|
||||
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.
|
||||
|
||||
Network Agent chat
|
||||
==================
|
||||
What do I need?
|
||||
---------------
|
||||
Perl, Perl Modules, MySQL, PHP, PHP Modules. See the Installation Documentation or go to http://pandora.sourceforge.net
|
||||
|
||||
Its possible to send data to remote TCP ports in Network Agents, you can use "^M" macro to replace \r\n (Return Carriage and Line Feed), for example, to use a simple http request: "GET / HTTP/1.0^M^M".
|
||||
License
|
||||
-------
|
||||
|
||||
remote_tcp_proc moduletype allows you to "expect" a string (rcv data). If this string is matched in any place of the answer, value will be 1 (OK), if not, 0 (BAD).
|
||||
The project is distributed under the GPL License v2 or later.
|
||||
|
||||
Network SNMP Agent
|
||||
==================
|
||||
Copyright (C) 2004-2006 Sancho Lerena.
|
||||
|
||||
SNMP OID MUST be provided in dotted format, p.e:
|
||||
|
||||
IF-MIB::ifInOctets.6 -> .1.3.6.1.2.1.2.2.1.16.6
|
||||
|
||||
SNMPv2-MIB::sysUpTime -> .1.3.6.1.2.1.1.3
|
||||
|
|
|
@ -17,16 +17,26 @@
|
|||
#along with this program; if not, write to the Free Software
|
||||
#Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
##################################################################################
|
||||
use strict;
|
||||
#use strict;
|
||||
use warnings;
|
||||
|
||||
use DBI; # DB interface with MySQL
|
||||
use DBI(); # DB interface with MySQL
|
||||
|
||||
my $dbh = DBI->connect("DBI:mysql:pandora:localhost:3306","pandora","pandora",{ RaiseError => 1 });
|
||||
|
||||
while (1){
|
||||
keep_alive_check();
|
||||
# dbd_open_test();
|
||||
dbd_select_test($dbh);
|
||||
}
|
||||
|
||||
sub keep_alive_check {
|
||||
my $dbh = DBI->connect("DBI:mysql:pandora:localhost:3306","pandora","pandora",{ RaiseError => 1, AutoCommit => 1 });
|
||||
$dbh->disconnect;
|
||||
sub dbd_select_test {
|
||||
my $dbh = shift;
|
||||
my $query = "select * from tagente";
|
||||
my $result = $dbh->prepare($query);
|
||||
$result ->execute;
|
||||
}
|
||||
|
||||
sub dbd_open_test {
|
||||
my $dbh = DBI->connect("DBI:mysql:pandora:localhost:3306","pandora","pandora",{ RaiseError => 1 });
|
||||
$dbh->disconnect;
|
||||
}
|
|
@ -112,6 +112,7 @@ sub pandora_loadconfig {
|
|||
my $archivo_cfg = $pa_config->{'pandora_path'}."/conf/pandora_server.conf";
|
||||
my $buffer_line;
|
||||
my @command_line;
|
||||
my $tbuf;
|
||||
|
||||
# Default values
|
||||
$pa_config->{'version'} = $pandora_version;
|
||||
|
@ -120,7 +121,7 @@ sub pandora_loadconfig {
|
|||
$pa_config->{"dbpass"} = "";
|
||||
$pa_config->{"dbhost"} = "";
|
||||
$pa_config->{"basepath"}=$pa_config->{'pandora_path'}; # Compatibility with Pandora 1.1
|
||||
$pa_config->{"incomingdir"}="";
|
||||
$pa_config->{"incomingdir"}=$pa_config->{'pandora_path'}."/data_in";
|
||||
$pa_config->{"server_threshold"}=30;
|
||||
$pa_config->{"alert_threshold"}=60;
|
||||
$pa_config->{"logfile"}=$pa_config->{'pandora_path'}."/log/pandora_server.log";
|
||||
|
@ -172,17 +173,38 @@ sub pandora_loadconfig {
|
|||
|
||||
for ($ax=0;$ax<=$ltotal;$ax++){
|
||||
$parametro = $args[$ax];
|
||||
if ($parametro =~ m/^incomingdir\s(.*)/i) { $pa_config->{"incomingdir"} = $1; }
|
||||
if ($parametro =~ m/^incomingdir\s(.*)/i) {
|
||||
$pa_config->{"incomingdir"} = $1;
|
||||
$tbuf= $1;
|
||||
if ($tbuf =~ m/^\.(.*)/){
|
||||
$pa_config->{"incomingdir"} =$pa_config->{"basepath"}.$1;
|
||||
} else {
|
||||
$pa_config->{"incomingdir"} = $tbuf;
|
||||
}
|
||||
}
|
||||
elsif ($parametro =~ m/^log_file\s(.*)/i) {
|
||||
$tbuf= $1;
|
||||
if ($tbuf =~ m/^\.(.*)/){
|
||||
$pa_config->{"logfile"} = $pa_config->{"basepath"}.$1;
|
||||
} else {
|
||||
$pa_config->{"logfile"} = $tbuf;
|
||||
}
|
||||
}
|
||||
elsif ($parametro =~ m/^errorlog_file\s(.*)/i) {
|
||||
$tbuf= $1;
|
||||
if ($tbuf =~ m/^\.(.*)/){
|
||||
$pa_config->{"errorlogfile"} = $pa_config->{"basepath"}.$1;
|
||||
} else {
|
||||
$pa_config->{"errorlogfile"} = $tbuf;
|
||||
}
|
||||
}
|
||||
elsif ($parametro =~ m/^dbuser\s(.*)/i) { $pa_config->{'dbuser'}= $1; }
|
||||
elsif ($parametro =~ m/^dbpass\s(.*)/i) { $pa_config->{'dbpass'}= $1; }
|
||||
elsif ($parametro =~ m/^dbhost\s(.*)/i) { $pa_config->{'dbhost'}= $1; }
|
||||
elsif ($parametro =~ m/^daemon\s([0-9]*)/i) { $pa_config->{'daemon'}= $1;}
|
||||
elsif ($parametro =~ m/^dataserver\s([0-9]*)/i) { $pa_config->{'dataserver'}= $1; }
|
||||
elsif ($parametro =~ m/^networkserver\s([0-9]*)/i) { $pa_config->{'networkserver'}= $1;}
|
||||
elsif ($parametro =~ m/^network_threads\s([0-9]*)/i) { $pa_config->{'network_threads'}= $1;}
|
||||
elsif ($parametro =~ m/^servername\s(.*)/i) { $pa_config->{'servername'}= $1; }
|
||||
elsif ($parametro =~ m/^log_file\s(.*)/i) { $pa_config->{"logfile"} = $1;}
|
||||
elsif ($parametro =~ m/^errorlog_file\s(.*)/i) { $pa_config->{"errorlogfile"} = $1; }
|
||||
elsif ($parametro =~ m/^checksum\s([0-9])/i) { $pa_config->{"pandora_check"} = $1; }
|
||||
elsif ($parametro =~ m/^master\s([0-9])/i) { $pa_config->{"pandora_master"} = $1; }
|
||||
elsif ($parametro =~ m/^snmpconsole\s([0-9])/i) { $pa_config->{"snmpconsole"} = $1;}
|
||||
|
@ -192,11 +214,14 @@ sub pandora_loadconfig {
|
|||
elsif ($parametro =~ m/^network_timeout\s([0-9]*)/i) { $pa_config->{'networktimeout'}= $1; }
|
||||
elsif ($parametro =~ m/^server_keepalive\s([0-9]*)/i) { $pa_config->{"keepalive"} = $1; $pa_config->{"keepalive_orig"} = $1; }
|
||||
}
|
||||
if ( $pa_config->{"verbosity"} > 0){
|
||||
if ( $pa_config->{"verbosity"} > 0){
|
||||
print " [*] Server basepath is ".$pa_config->{'basepath'}."\n";
|
||||
print " [*] Server logfile at ".$pa_config->{"logfile"}."\n";
|
||||
print " [*] Server errorlogfile at ".$pa_config->{"errorlogfile"}."\n";
|
||||
print " [*] Server incoming directory at ".$pa_config->{"incomingdir"}."\n";
|
||||
print " [*] Server keepalive ".$pa_config->{"keepalive"}."\n";
|
||||
print " [*] Server threshold ".$pa_config->{"server_threshold"}."\n";
|
||||
}
|
||||
|
||||
# Check for valid token token values
|
||||
if (( $pa_config->{"dbuser"} eq "" ) || ( $pa_config->{"basepath"} eq "" ) || ( $pa_config->{"incomingdir"} eq "" ) || ( $pa_config->{"logfile"} eq "" ) || ( $pa_config->{"dbhost"} eq "") || ( $pa_config->{"pandora_master"} eq "") || ( $pa_config->{"dbpass"} eq "" ) ) {
|
||||
print "[ERROR] Bad Config values. Be sure that $archivo_cfg is a valid setup file. \n\n";
|
||||
|
@ -233,9 +258,6 @@ sub pandora_loadconfig {
|
|||
if ($pa_config->{"pandora_master"} == 1) {
|
||||
print " [*] This server is running in MASTER mode.\n";
|
||||
}
|
||||
if ($pa_config->{"daemon"} == 1) {
|
||||
print " [*] This server is running in DAEMON mode.\n";
|
||||
}
|
||||
logger ($pa_config, "Launching $parametro $pa_config->{'version'} $pa_config->{'build'}", 0);
|
||||
my $config_options = "Logfile at ".$pa_config->{"logfile"}.", Basepath is ".$pa_config->{"basepath"}.", Checksum is ".$pa_config->{"pandora_check"}.", Master is ".$pa_config->{"pandora_master"}.", SNMP Console is ".$pa_config->{"snmpconsole"}.", Server Threshold at ".$pa_config->{"server_threshold"}." sec, verbosity at ".$pa_config->{"verbosity"}.", Alert Threshold at $pa_config->{'alert_threshold'}";
|
||||
logger ($pa_config, "Config options: $config_options");
|
||||
|
|
|
@ -5,18 +5,17 @@
|
|||
# Servername: Name of this server
|
||||
servername daeva
|
||||
|
||||
# basepath: Defines base path for pandora server installation
|
||||
basepath /opt/pandora_server
|
||||
|
||||
# incomingdir: Defines directory where incoming data packets are stored
|
||||
incomingdir /opt/pandora_server/data_in
|
||||
# You could set directory relative to base path or absolute, starting with /
|
||||
incomingdir ./data_in
|
||||
|
||||
# log_file: Main logfile for pandora_server
|
||||
log_file /opt/pandora_server/log/pandora_server.log
|
||||
# You could set file relative to base path or absolute, starting with /
|
||||
log_file ./log/pandora_server.log
|
||||
|
||||
# Error logfile: Aix logfile for pandora_server errors (in Daemon mode)
|
||||
# NEW in Pandora 1.2
|
||||
errorlog_file /opt/pandora_server/log/pandora_server.error
|
||||
# Error logfile: aux logfile for pandora_server errors (in Daemon mode)
|
||||
# You could set file relative to base path or absolute, starting with /
|
||||
errorlog_file ./log/pandora_server.error
|
||||
|
||||
# dbuser: Database user name (pandora by default)
|
||||
dbuser pandora
|
||||
|
@ -37,7 +36,7 @@ dbhost localhost
|
|||
verbosity 10
|
||||
|
||||
# Server Threshold: defines number of seconds of main loop (in sec)
|
||||
server_threshold 1
|
||||
server_threshold 30
|
||||
|
||||
# Alert threshold
|
||||
alert_threshold 60
|
||||
|
|
Loading…
Reference in New Issue