2012-05-23 Ramon Novoa <rnovoa@artica.es>

* pc: Added to repository. Generic PC agent for Unix/Win32 (still in
	  alpha).



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6339 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
ramonn 2012-05-23 17:16:32 +00:00
parent 7fae54dc69
commit 2c35d793da
201 changed files with 65832 additions and 2300 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,158 @@
# Base config file for Pandora FMS agents
# Version 3.0, AIX version
# Licensed under GPL license v2,
# Copyright (c) 2003-2010 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
# General Parameters
# ==================
server_ip localhost
server_path /var/spool/pandora/data_in
temporal /tmp
logfile /var/log/pandora/pandora_agent.log
# Interval in seconds, 300 by default
interval 300
# Debug mode only generate XML, and stop after first execution,
# and does not copy XML to server.
debug 0
# By default, agent takes machine name
#agent_name xxxxxx
# Agent description
#description Demo agent
# Group assigned for this agent (descriptive, p.e: Servers)
#group Servers
# Autotime: Enforce to server to ignore timestamp coming from this
# agent, used when agents has no timer or it's inestable. 1 to enable
# this feature
# autotime 1
# Timezone offset: Difference with the server timezone
#timezone_offset 0
# Agent position paramters
# Those parameters define the geographical position of the agent
# latitude
#latitude 0
# longitude
#longitude 0
# altitude
#altitude 0
# By default agent try to take default encoding defined in host.
# encoding iso-8859-15
# Listening TCP port for remote server. By default is 41121 (for tentacle)
# if you want to use SSH use 22, and FTP uses 21.
server_port 41121
# Transfer mode: tentacle, ftp, ssh or local
transfer_mode tentacle
# Server password (Tentacle or FTP). Leave empty for no password (default).
# server_pwd mypassword
# Set to yes/no to enable/disable OpenSSL support for Tentacle (disabled by default).
# server_ssl no
# Extra options for the Tentacle client (for example, server_opts "-v -r 5").
# server_opts
# delayed_startup defines number of seconds before start execution
# for first time when startup Pandora FMS Agent
# delayed_startup 10
# Pandora nice defines priority of execution. Less priority means more intensive execution
# A recommended value is 10. 0 priority means no Pandora CPU protection enabled (default)
# pandora_nice 0
# Cron mode replace Pandora FMS own task schedule each XX interval seconds by the use
# of old style cron. You should add to crontab Pandora FMS agent script to use this mode.
# This is disabled by default, and is not recommended. Use Pandora FMS internal scheduler
# is much more safe.
# cron_mode
# If set to 1 allows the agent to be configured via the web console (Only Enterprise version)
# remote_config 1
# If set to 1 start Drone Agent's Proxy Mode
# proxy_mode 1
# Max number of simmultaneus connection for proxy (by default 10)
# proxy_max_connection 10
# Proxy timeout (by default 1s)
# proxy_timeout 1
# User the agent will run as
#pandora_user root
# Secondary server configuration
# ==============================
# If secondary_mode is set to on_error, data files are copied to the secondary
# server only if the primary server fails. If set to always, data files are
# always copied to the secondary server.
# secondary_mode on_error
# secondary_server_ip localhost
# secondary_server_path /var/spool/pandora/data_in
# secondary_server_port 41121
# secondary_transfer_mode tentacle
# secondary_server_pwd mypassword
# secondary_server_ssl no
# secondary_server_opts
# Module Definition
# =================
# System information
module_begin
module_name disk_root_free
module_type generic_data
module_exec df -k / | tail -1 | awk '{ print 100-$4 }'
module_max 100
module_min 0
module_description Free disk Percentage of root partition
module_end
module_begin
module_name proctotal
module_type generic_data
module_exec ps aux | wc -l | awk '{ print $1 }'
module_end
# Process information
module_begin
module_name InetdDaemon
module_type generic_proc
module_exec ps -Af | grep inetd | grep -v "grep" | wc -l | awk '{ print $1 }'
module_end
# Async data example
module_begin
module_name LastLogin
module_type async_string
module_exec last | head -1
module_end
module_begin
module_name Pandora_Agent_RAM
module_type generic_data
module_exec ps axu | grep perl | grep -v grep | awk '{ print $4 }' | tr "," "."
module_end
module_plugin grep_log /var/adm/syslog Syslog .

View File

@ -0,0 +1,3 @@
Sancho Lerena <slerena@gmail.com>
Manuel Arostegui <manuel.arostegui@artica.es>
Ramon Novoa <rnovoa@artica.es>

92
pandora_agents/pc/COPYING Normal file
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

678
pandora_agents/pc/ChangeLog Normal file
View File

@ -0,0 +1,678 @@
2012-04-25 Miguel de Dios <miguel.dedios@artica.es>
* DEBIAN/postinst, DEBIAN/make_deb_package.sh: disabled the checking
the plugins files with same name.
2012-04-24 Ramon Novoa <rnovoa@artica.es>
* pandora_agent: Merged from 4.0 branch. Leave the secondary server
password empty by default. Fixes bug #3519520.
2012-04-20 Ramon Novoa <rnovoa@artica.es>
* pandora_agent_installer: Removed an unused variable.
2012-04-20 Ramon Novoa <rnovoa@artica.es>
* pandora_agent_installer: Backup and restore conf file and daemon
launcher. Moved the code that sets PANDORA_USER back to its original
place and set the variable properly instead.
2012-04-19 Koichiro Kikuchi <koichiro@rworks.jp>
* pandora_agent: Also added the temporal directory to the file path
for symlink check.
2012-04-18 Ramon Novoa <rnovoa@artica.es>
* pandora_agent: Add the temporal directory to the file path before
trying to send a buffered XML file.
2012-03-28 Ramon Novoa <rnovoa@artica.es>
* pandora_agent_installer: Moved the code that sets PANDORA_USER to
the right place.
2012-03-02 Koichiro Kikuchi <koichiro@rworks.jp>
* pandora_agent: Fixed bug of my previous commit (removed "qw").
2012-03-01 Koichiro Kikuchi <koichiro@rworks.jp>
* pandora_agent: Added symlink checks for temporary files before writing
them to avoid symlink attacks.
2012-02-29 Ramon Novoa <rnovoa@artica.es>
* Linux/pandora_agent.conf: Added a warning text. Thanks to Koichiro.
2012-02-28 Ramon Novoa <rnovoa@artica.es>
* Linux/pandora_agent.conf,
pandora_agent: Added support for xml_buffer.
2012-02-23 Ramon Novoa <rnovoa@artica.es>
* pandora_agent: Set the intensive interval before reading modules.
2012-02-10 Hirofumi Kosaka <kosaka@rworks.jp>
* pandora_agent: Allow filename wildcards to specify
additional configuration files.
2012-01-03 Ramon Novoa <rnovoa@artica.es>
* pandora_agent: Added support for intensive modules.
2011-12-19 Ramon Novoa <rnovoa@artica.es>
* pandora_agent: Merged from 4.0 branch. Empty the broker PID array.
2011-12-19 Ramon Novoa <rnovoa@artica.es>
* pandora_agent: Wait for broker childs instead of ignoring
SIGCHLD.
2011-12-19 Ramon Novoa <rnovoa@artica.es>
* pandora_agent: Ignore SIGCHLD.
2011-12-16 Ramon Novoa <rnovoa@artica.es>
* pandora_agent: Empty modules, plugins and collections before
running a broker agent.
2011-12-14 Ramon Novoa <rnovoa@artica.es>
* pandora_agent: Do not display a warning if the output of a
pre-condition is not numeric.
2011-12-07 KIKUCHI Koichiro <koichiro@rworks.jp>
* pandora_agent_installer: Removed duplicated lines and spaces to
tabs. Also removed lines that set group to wheel (gid of wheel is 0).
* plugins/files_indir: Added support for FreeBSD.
* plugins/pandora_update: Fixed $conf_path for FreeBSD and spaces
to tabs.
2011-11-15 Ramon Novoa <rnovoa@artica.es>
* pandora_agent: Re-wrote broker agent code (was not working properly).
2011-09-29 Koichiro Kikuchi <koichiro@rworks.jp>
* pandora_agent.redhat.spec: Fixed wrong command paths in %prereq.
2011-09-13 Koichiro Kikuchi <koichiro@rworks.jp>
* pandora_agent: Clear the old process information before
parsing current process information. Also added
missing load_procs() call to module_cpuproc().
2011-09-05 Koichiro Kikuchi <koichiro@rworks.jp>
* pandora_agent_daemon: Added support for OpenVZ/Virtuozzo.
2011-09-02 Koichiro Kikuchi <koichiro@rworks.jp>
* pandora_agent: Now module_condition and module_precondition
accept numeric parameter without fractional part.
2011-08-22 Sancho Lerena <slerena@artica.es>
* pandora_agent.spec,
pandora_agent.redhat.spec (added) Updated specs to be used
with OpenSUSE build service. New version for CentOS/RHEL
2011-08-19 Sancho Lerena <slerena@artica.es>
* DEBIAN/control
DEBIAN/make_deb_package.sh: Updated version to 4.0RC1.
2011-08-19 Sancho Lerena <slerena@artica.es>
* pandora_agents/unix/pandora_agent.spec: Updated spec.
2011-07-14 Ramon Novoa <rnovoa@artica.es>
* pandora_agent: Set additional module configuration parameters
from the XML.
2011-04-13 Dario Rodriguez <dario.rodriguez@artica.es>
* HP-UX/pandora_agent.conf: Fixed a wrong path for command swapinfo.
2011-04-28 Junichi Satoh <junichi@rworks.jp>
* SunOS/make_solaris_package/prototype,
SunOS/make_solaris_package/make_solaris_package.sh: Added tentacle_server.
2011-04-28 Junichi Satoh <junichi@rworks.jp>
* FreeBSD/pandora_agent.conf: Added missing templates.
2011-04-13 Dario Rodriguez <dario.rodriguez@artica.es>
* AIX/pandora_agent.conf, Linux/pandora_agent.conf, HP-UX/pandora_agent.conf
SunOS/pandora_agent.conf: Deleted proxy_user parameter because is not
needed. Also fixed some comments.
* pandora_agent: Resctricted Proxy Mode to non root users. The agent must
be launched by a non root user to use Proxy Mode.
2011-04-12 Dario Rodriguez <dario.rodriguez@artica.es>
* pandora_agent_daemon: Deleted code that kill tentacle server and
replaced kill -9 to kill of agent stop command.
* Linux/pandora_agent.conf, AIX/pandora_agent.conf,
HP-UX/pandora_agent.conf,SunOS/pandora_agent.conf : Added parameters
proxy_max_connection and proxy_timeout 1.
* pandora_agent: Fixed problems launching tentacle_server and also
added code to handle kill signal.
2011-04-11 Dario Rodriguez <dario.rodriguez@artica.es>
* pandora_agent: Fixed an error with command that launch tentacle server
when proxy mode is enable.
2011-04-11 Dario Rodriguez <dario.rodriguez@artica.es>
* pandora_agent_installer: Added code to install tentacle_server with
pandora agent.
* AIX/pandora_agent.conf: Added two new parameters proxy_mode and
proxy_user.
* tentacle_server: Added tentacle server with proxy support.
* pandora_agent_daemon: Add feature to stop tentacle_server when
pandora agent stops.
* Linux/pandora_agent.conf: Added two new parameters proxy_mode and
proxy_user.
* HP-UX/pandora_agent.conf: Added two new parameters proxy_mode and
proxy_user.
* pandora_agent: Added support to tentacle_server and proxy_mode.
* SunOS/pandora_agent.conf: Added two new parameters proxy_mode and
proxy_user.
2011-04-04 Dario Rodriguez <dario.rodriguez@artica.es>
* pandora_agent_installer: Fixed an error with chown in AIX OS.
2011-04-04 Dario Rodriguez <dario.rodriguez@artica.es>
* plugins/pandora_update: Fixed a problem getting pandora_agent pid
in SunOS.
2011-04-04 Dario Rodriguez <dario.rodriguez@artica.es>
* pandora_agent_installer: Added correct user to tentacle_client binary.
2011-04-04 Dario Rodriguez <dario.rodriguez@artica.es>
* pandora_agent_installer: Modified agent isntaller to deal with
specified user installation.
2011-04-04 Dario Rodriguez <dario.rodriguez@artica.es>
* plugins/pandora_update: Modified plugin for agent autoupdate.
2011-03-09 Ramon Novoa <rnovoa@artica.es>
* pandora_agent: Fixed a typo.
2011-03-09 Ramon Novoa <rnovoa@artica.es>
* pandora_agent: Added a module to get the ocupied space % in a
partition.
2011-02-23 Ramon Novoa <rnovoa@artica.es>
* DEBIAN/postinst: Updated.
2011-02-14 Sancho Lerena <slerena@artica.es>
* OpenWRT: Special files for OpenWRT/Perl version.
2011-02-10 Ramon Novoa <rnovoa@artica.es>
* pandora_agent: Detach threads to avoid excessive resource usage,
since threads were not joined until all modules were executed.
2011-02-01 Junichi Satoh <junichi@rworks.jp>
* FreeBSD/pandora_agent.conf: Fixed invalid cpu usage data is returned
when system has only one disk device.
2011-01-27 Junichi Satoh <junichi@rworks.jp>
* pandora_agent_daemon: Changed order of 'su' argument.
Username should be as the 1st argument on Solaris.
2010-12-28 Ramon Novoa <rnovoa@artica.es>
* pandora_agent.spec: Added a release variable as in the rest of the
spec files.
2010-12-27 Ramon Novoa <rnovoa@artica.es>
* pandora_agent_installer, DEBIAN/postinst, DEBIAN/prerm,
DEBIAN/make_deb_package.sh, pandora_agent.spec,
pandora_agent, SunOS/make_solaris_package/prototype,
SunOS/make_solaris_package/make_solaris_package.sh,
pandora_agent_exec: Renamed pandora_exec to
pandora_agent_exec to avoid conflicts with the pandora_exec
script installed by the server.
2010-12-16 Ramon Novoa <rnovoa@artica.es>
* pandora_agent_installer, pandora_agent_daemon: Additional
changes to run the agent as a different user. Starting and
stopping the daemon did not work except as root.
2010-12-16 Miguel de Dios <miguel.dedios@artica.es>
* DEBIAN/control, DEBIAN/make_deb_package.sh, pandora_console.spec,
pandora_console.redhat.spec: update the version number.
2010-12-04 Junichi Satoh <junichi@rworks.jp>
* plugins/pandora_update: Added support for FreeBSD.
2010-12-02 Junichi Satoh <junichi@rworks.jp>
* SunOS/make_solaris_package/prototype: Added pandora_update.
2010-12-01 Ramon Novoa <rnovoa@artica.es>
* plugins/pandora_update: Fixed md5 calculation.
2010-11-29 Ramon Novoa <rnovoa@artica.es>
* pandora_agent_installer: Remove all init symbolic links.
* plugins/pandora_update: Give the agent daemon some time to stop.
Necessary on Windows.
2010-11-25 Miguel de Dios <miguel.dedios@artica.es>
* pandora_agent.spec: change version number.
2010-11-22 Ramon Novoa <rnovoa@artica.es>
* pandora_agent_daemon: Solaris specific fixes.
2010-11-22 Ramon Novoa <rnovoa@artica.es>
* Linux/pandora_agent.conf: Set root as the default pandora_user.
* pandora_agent: Share the semaphore after creating it. Removed
an unnecessary require.
2010-11-19 Ramon Novoa <rnovoa@artica.es>
* pandora_agent, AIX/pandora_agent.conf,
pandora_agent_daemon, Linux/pandora_agent.conf,
HP-UX/pandora_agent.conf, NT4/pandora_agent.conf,
SunOS/pandora_agent.conf, FreeBSD/pandora_agent.conf: Added a new
configuration option that lets the agent run as a different user
by changing the process' EUID.
* pandora_agent_installer: Several fixes.
2010-11-15 Raúl Mateos <raulofpandora@gmail.com>
* pandora_agent*, pandora_exec, plugins/pandora_update: Small changes:
Year, version, spaces to tabs.
2010-11-14 Sancho Lerena <slerena@artica.es>
* plugins/pandora_update: Small tool (in perl), used also in windows
(compiled as .exe), to auto-upgrade the software agents by stopping
replacing the binary, and starting again the service/process, and also
notifying the system about the upgrade. This will be possible using
the new filecollection mechanism in 3.2 version.
2010-11-10 Miguel de Dios <miguel.dedios@artica.es>
* DEBIAN/postinst, DEBIAN/prerm, DEBIAN/make_deb_package.sh: fixed the use
pandora_exec for Pandora Server and Pandora Agent, now make a
pandora_exec.agent and try to link to pandora_exec.
Fixes: #3106578
2010-11-10 Miguel de Dios <miguel.dedios@artica.es>
* DEBIAN/make_deb_package.sh: fixed the include the bigger NT4 files in the
DEB package.
2010-11-04 Sancho Lerena <slerena@artica.es>
* NT4: New binary version of Unix perl agent for NT4, with some tools.
.exe compiled with ActiveState SDK 9.0
* pandora_agent: Some small modifications to make it work nicely in
windows boxes.
2010-11-02 Raul Mateos <raulofpandora@gmail.com>
* tentacle_client: Fixed year from last commit. Converted some spaces
to tab.
2010-11-02 Miguel de Dios <miguel.dedios@artica.es>
* ChangeLog: uploaded lost lines of my commit of yesterday.
2010-11-01 Miguel de Dios <miguel.dedios@artica.es>
* DEBIAN/postinst, DEBIAN/conffiles, DEBIAN/make_deb_package.sh: fixed the
warning of check md5sum on dir "plugins". Now the dir "plugins" is filled
postinstall with the package plugins in temp directory, the copy is
interactive for don't overwrite the user modified plugins of previous
installation.
Fixes: #3081496
2010-10-19 Junichi Satoh <junichi@rworks.jp>
* SunOS/make_solaris_package/prototype: Added nagios_plugin_wrapper.
2010-10-15 Sancho Lerena <slerena@artica.es>
* plugins/nagios_plugin_wrapper: Added new plugin.
* pandora_agent: Version update.
2010-10-08 Ramon Novoa <rnovoa@artica.es>
* pandora_agent: Pass server_pwd and server_ssl configuration tokens
to tentacle. Fixes bug #3080299.
2010-10-07 Ramon Novoa <rnovoa@artica.es>
* Linux/pandora_agent.conf: Added an example usage of the
agent_threads configuration token.
2010-10-06 Junichi Satoh <junichi@rworks.jp>
* pandora_agent: Added FreeBSD specific commands.
2010-10-04 Ramon Novoa <rnovoa@artica.es>
* plugins/inventory: Fixed inventory process information.
* pandora_agent: Fixed an error that showed when no logfile was
specified in the agent configuration file.
2010-09-27 Junichi Satoh <junichi@rworks.jp>
* FreeBSD/pandora_agent: Fixed a typo.
2010-09-27 Junichi Satoh <junichi@rworks.jp>
* FreeBSD/pandora_agent: Changed PID detection method to support
"jail", FreeBSD virtualization.
2010-09-27 Junichi Satoh <junichi@rworks.jp>
* pandora_agent_installer: Set PANDORA_USER="root" when it is not
defined.
2010-09-22 Sancho Lerena <slerena@artica.es>
* pandora_agent.spec: Updated RPM spec for SUSE
2010-09-17 Ramon Novoa <rnovoa@artica.es>
* pandora_agent: Added multi-thread support.
2010-09-17 Junichi Satoh <junichi@rworks.jp>
* SunOS/make_solaris_package/README,
SunOS/make_solaris_package/copyright,
SunOS/make_solaris_package/make_solaris_package.sh,
SunOS/make_solaris_package/prototype: Added agent package builder
for Solaris.
2010-08-17 Junichi Satoh <junichi@rworks.jp>
* pandora_agent_daemon, tentacle_client: Added support for Solaris
virtualization, "zone".
2010-08-11 Ramon Novoa <rnovoa@artica.es>
* pandora_agent: Fixed collection issues related to the agent. See
bug #3042577.
2010-08-04 Sancho Lerena <slerena@artica.es>
* DEBIAN/control,
pandora_agent.spec: Added unzip to dependencies (for fille collection
management).
2010-08-04 Miguel de Dios <miguel.dedios@artica.es>
* pandora_agent_daemon: fixed user of daemon, it is root, not dario.
2010-07-28 Junichi Satoh <junichi@rworks.jp>
* SunOS/pandora_agent.conf: Fixed a typo.
2010-07-21 Ramon Novoa <rnovoa@artica.es>
* pandora_agent: Delete unused collections.
2010-07-20 Ramon Novoa <rnovoa@artica.es>
* pandora_agent_installer: Fixed some directories and permissions.
2010-07-20 Ramon Novoa <rnovoa@artica.es>
* pandora_agent_installer,
DEBIAN/make_deb_package.sh,
pandora_agent.spec: Updated to take the collections directory into
account.
* collections: Added to repository. Collections directory.
2010-07-19 Ramon Novoa <rnovoa@artica.es>
* pandora_agent: Added support for file collections.
2010-07-12 Ramon Novoa <rnovoa@artica.es>
* pandora_agent: changed the module cron configuration token to
module_crontab.
2010-07-08 Ramon Novoa <rnovoa@artica.es>
* pandora_exec: Do not verify the command to allow pipes and complex
commands.
* pandora_agent: Quote the command passed to pandora_exec. Fixed
the module cron. Modules without a module cron would not run.
2010-07-05 Junichi Satoh <junichi@rworks.jp>
* pandora_agent_installer: Fixed typo and directory permission
for FreeBSD.
* FreeBSD/pandora_agent: Simplified.
2010-07-02 Ramon Novoa <rnovoa@artica.es>
* pandora_agent: Fixed a typo.
2010-06-30 Ramon Novoa <rnovoa@artica.es>
* pandora_agent: Improved the module cron to allow intervals and
multiple runs within an interval.
2010-06-30 Ramon Novoa <rnovoa@artica.es>
* pandora_agent: Call df with -P from the Linux abstraction layer
to avoid split lines.
2010-06-25 Ramon Novoa <rnovoa@artica.es>
* pandora_agent: Added the module_cron feature to schedule modules
using a cron-like syntax.
2010-06-23 Ramon Novoa <rnovoa@artica.es>
* pandora_agent: Added the module_save and module_condition features.
See http://www.openideas.info/wiki/ for more information.
2010-06-14 Junichi Satoh <junichi@rworks.jp>
* pandora_agent_installer: Set execute bit to startup script for
FreeBSD.
2010-06-09 Ramon Novoa <rnovoa@artica.es>
* pandora_agent: Improved OS version detection. Disabled error output
for plugins.
2010-06-09 Ramon Novoa <rnovoa@artica.es>
* pandora_agent.spec: Create the man dir.
2010-06-09 Ramon Novoa <rnovoa@artica.es>
* pandora_agent_installer, pandora_agent.spec: Copy the man pages.
2010-06-08 Ramon Novoa <rnovoa@artica.es>
* pandora_agent: Removed the need for indexes in the abstraction layer.
2010-06-07 Ramon Novoa <rnovoa@artica.es>
* pandora_agent: Added build information to the agent version.
2010-06-07 Junichi Satoh <junichi@rworks.jp>
* pandora_agent_installer: Added support for FreeBSD.
* FreeBSD/pandora_agent: Added startup script for FreeBSD.
* FreeBSD/pandora_agent.conf: Added configuration file for FreeBSD.
2010-06-04 Ramon Novoa <rnovoa@artica.es>
* pandora_agent.spec: Fixed. Upgrading an RPM broke the installation.
2010-05-20 Miguel de Dios <miguel.dedios@artica.es>
* DEBIAN/postinst, DEBIAN/make_deb_package.sh: fixed the script to generate
deb package.
2010-05-20 Miguel de Dios <miguel.dedios@artica.es>
* DEBIAN/make_deb_package.sh: fixed the permissions to DEBIAN temp package.
2010-05-19 Miguel de Dios <miguel.dedios@artica.es>
* DEBIAN, DEBIAN/control, DEBIAN/conffiles, DEBIAN/make_deb_package.sh,
DEBIAN/md5sums: added the scripts and conf files for create package.
2010-05-18 Ramon Novoa <rnovoa@artica.es>
* pandora_agent: Added a data collection layer and native modules
similar to those of the Windows agent.
2010-05-13 Ramon Novoa <rnovoa@artica.es>
* pandora_agent: Disabled the plugin command check. Was not working.
2010-04-29 Sancho Lerena <slerena@artica.es>
* pandora_agent_installer: Added darwin (snow leopard), and BSD to
installer OS detection.
* AIX/pandora_agent.conf: Fixed version & date.
* HP-UX/pandora_agent.conf: Replaced some default modules by
better ones.
2010-02-22 Pablo de la Concepción <pablo.concepcion@artica.es>
* Linux/pandora_agent.conf: Added parameters position_description
and parent_agent_name, and updated loadaverage with a more efficient
version.
* pandora_agent: Added POD documentation, modified to only add
to the XML the minimum parameters (positional parameters,
parent_agent_name,...) are not sent with default values if not
deffined in the config file. Updated verion and build.
2010-02-16 Pablo de la Concepción <pablo.concepcion@artica.es>
* Linux/pandora_agent.conf: Fixed Load Average module example
2010-02-16 Pablo de la Concepción <pablo.concepcion@artica.es>
Updated tentacle from the tentacle repository and generated
manpage. TODO:Make the installer install the manpages
* unix/tentacle_client: Added pod documentation to generate manpages.
* man/man1/tentacle_client.1: First version of the manpages for
tentacle_client
2010-02-10 Miguel de Dios <miguel.dedios@artica.es>
* pandora_agent_installer: fix bug when uninstall the agent in the same
machine that it have a Pandora Server, that the uninstaller deleted the
dirs share with Pandora Server (/var/spool/pandora/*)
2010-01-27 Sancho Lerena <slerena@artica,es>
* plugins/files_indir: New agent to detect if files in a specficied
directory are less than in previous run. Return two modules.
2009-12-15 Ramon Novoa <rnovoa@artica.es>
* pandora_agent: Removed debugging code.
2009-12-15 Ramon Novoa <rnovoa@artica.es>
* pandora_agent: Make modules with a module_interval run the first time.
2009-12-07 Sancho Lerena <slerena@artica.es>
* plugins/inventory: Fixed some problems with the plugin (for linux). Added
inventory for RPM systems.
2009-12-03 Ramon Novoa <rnovoa@artica.es>
* pandora_agent: Empty modules and plugins before loading a remote
configuration. Made the md5 function 64bit proof :-)
2009-11-19 Ramon Novoa <rnovoa@artica.es>
* pandora_agent: Fixed bug #2888991. Skip remote_config if debug is enabled.
2009-11-18 Sancho Lerena <slerena@artica.es>
* pandora_agent: Fixed a problem sending the module type in the XML.
This causes that all modules were "generic_data".
2009-11-16 Sancho Lerena <slerena@artica.es>
* pandora_agent: Updated default encoding to iso-8859-1 instead
iso-8859-15, because in some systems this encoding is not installed
and don't work :-(. Thanks for summa_sp for report this.
2009-11-06 Raul Mateos <raulofpandora@gmail.com>
* *.conf: Updated URL and some small fixes.
* README: Updated name :-D
2009-11-05 Sancho Lerena <slerena@gmail.com>
* pandora_agent_installer: Added a common installer for all systems.
* Deleted daemon script for all systems, creaded a general one.
* Modified HPUX to HP-UX directory.
* Updated some .conf

View File

@ -0,0 +1 @@
/etc/pandora/pandora_agent.conf

View File

@ -0,0 +1,10 @@
package: pandorafms-agent-unix
Version: 4.0.1
Architecture: all
Priority: optional
Section: admin
Installed-Size: 260
Maintainer: Miguel de Dios <miguel.dedios@artica.es>
Homepage: http://pandorafms.org/
Depends: coreutils, perl, unzip
Description: Pandora FMS agents are based on native languages in every platform: scripts that can be written in any language. Its possible to reproduce any agent in any programming language and can be extended without difficulty the existing ones in order to cover aspects not taken into account up to the moment. These scripts are formed by modules that each one gathers a "chunk" of information. Thus, every agent gathers several "chunks" of information; this one is organized in a data set and stored in a single file, called data file.

View File

@ -0,0 +1,118 @@
#!/bin/bash
#Pandora FMS- http:#pandorafms.com
# ==================================================
# Copyright (c) 2005-2010 Artica Soluciones Tecnologicas
# Please see http:#pandorafms.org for full contribution list
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public License
# as published by the Free Software Foundation; version 2
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
pandora_version="4.0.1"
echo "Test if you has the tools for to make the packages."
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
if [ $? = 1 ]
then
echo "No found \"dpkg-deb\" aplication, please install."
exit 1
else
echo "Found \"dpkg-debs\"."
fi
cd ..
echo "Make a \"temp_package\" temp dir for job."
mkdir -p temp_package/usr
mkdir -p temp_package/usr/share/pandora_agent/
mkdir -p temp_package/usr/bin/
mkdir -p temp_package/usr/sbin/
mkdir -p temp_package/etc/pandora/plugins
mkdir -p temp_package/etc/pandora/collections
mkdir -p temp_package/etc/init.d/
mkdir -p temp_package/var/log/pandora/
mkdir -p temp_package/usr/share/man/man1/
mkdir -p temp_package/usr/share/pandora_agent/plugins
mkdir -p temp_package/tmp
echo "Make directory system tree for package."
cp DEBIAN temp_package -R
chmod 755 -R temp_package/DEBIAN
#Next lines is same to
#cp -aRf * temp_package/usr/share/pandora_agent/
#but don't copy recursive the temp_package into temp_package
for item in `ls | grep -v NT4 | grep -v AIX | grep -v FreeBSD | grep -v HP-UX | grep -v SunOS | grep -v temp_package`
do
#if [ \( $item != 'temp_package' \) -a \( $item != 'NT4' \) ]
#then
cp -aRf $item temp_package/usr/share/pandora_agent/
#fi
done
cp -aRf tentacle_client temp_package/usr/bin/
cp -aRf pandora_agent temp_package/usr/bin/
cp -aRf pandora_agent_exec temp_package/usr/bin/pandora_agent_exec
cp -aRf pandora_agent_daemon temp_package/etc/init.d/pandora_agent_daemon
cp Linux/pandora_agent.conf temp_package/etc/pandora/
cp -aRf man/man1/* temp_package/usr/share/man/man1/
#Disabled, now the package overwrite the previous files.
##Create a temp file for to update files of plugins dir but don't crush dir.
##cp -aRf temp_package/usr/share/pandora_agent/plugins temp_package/tmp
##rm -rf temp_package/usr/share/pandora_agent/plugins/*
echo "Remove the SVN files and other temp files."
for item in `find temp_package`
do
echo -n "."
echo $item | grep "svn" > /dev/null
#last command success
if [ $? -eq 0 ]
then
rm -rf $item
fi
echo $item | grep "make_deb_package.sh" > /dev/null
#last command success
if [ $? -eq 0 ]
then
rm -rf $item
fi
done
echo "END"
echo "Calcule md5sum for md5sums file control of package"
for item in `find temp_package`
do
echo -n "."
if [ ! -d $item ]
then
echo $item | grep "DEBIAN" > /dev/null
#last command success
if [ $? -eq 1 ]
then
md5=`md5sum $item | cut -d" " -f1`
#delete "temp_package" in the path
final_path=${item#temp_package}
echo $md5" "$final_path >> temp_package/DEBIAN/md5sums
fi
fi
done
echo "END"
echo "Make the package \"Pandorafms console\"."
dpkg-deb --build temp_package
mv temp_package.deb pandorafms.agent_unix_$pandora_version.deb
echo "Delete the \"temp_package\" temp dir for job."
rm -rf temp_package

View File

View File

@ -0,0 +1,41 @@
#!/bin/bash
PANDORA_LOG=/var/log/pandora/pandora_agent.log
PANDORA_BIN=/usr/bin/pandora_agent
PANDORA_EXEC_BIN=/usr/bin/pandora_agent
PANDORA_HOME=/usr/share/pandora_agent
PANDORA_CFG=/etc/pandora
LOG_TIMESTAMP=`date +"%Y/%m/%d %H:%M:%S"`
#Disabled, now the package overwrite the previous files.
#echo "Copy new version of plugins into dir"
#cp -i /tmp/plugins/* /usr/share/pandora_agent/plugins/
#rm /tmp/plugins -rf
echo "Linking Pandora FMS Agent plugins directory to $PANDORA_CFG/plugins..."
rm $PANDORA_CFG/plugins 2> /dev/null
ln -s $PANDORA_HOME/plugins $PANDORA_CFG 2> /dev/null
echo "Linking Pandora FMS Agent configuration to $PANDORA_CFG/pandora_agent.conf..."
#~ rm $PANDORA_CFG/pandora_agent.conf 2> /dev/null
#~ ln -s $PANDORA_HOME/pandora_agent.conf $PANDORA_CFG/pandora_agent.conf
echo "Start log of agent."
echo "$LOG_TIMESTAMP Pandora FMS installer has created this file at startup" > $PANDORA_LOG
echo "Setting secure permissions and ownership for all Pandora FMS Agent files..."
chmod 700 $PANDORA_BIN
chmod 700 $PANDORA_EXEC_BIN
#~ chmod 600 $PANDORA_HOME/pandora_agent.conf
chmod -R 700 $PANDORA_HOME/plugins
chown -R root $PANDORA_HOME
chmod 640 $PANDORA_LOG
chgrp root $PANDORA_LOG
chown -R root:root $PANDORA_BIN
chown -R root:root $PANDORA_EXEC_BIN
echo "Linking start-up daemon script to /etc/rc$INITLV.d";
update-rc.d pandora_agent_daemon defaults
echo "Please, now setup the $PANDORA_HOME/pandora_agent.conf and before start the /etc/init.d/pandora_agent_daemon"

View File

@ -0,0 +1,11 @@
#!/bin/bash
echo Stop Pandora agent daemon
/etc/init.d/pandora_agent_daemon stop
PANDORA_CFG=/etc/pandora
#rm -rf $PANDORA_CFG/plugins
#rm -rf $PANDORA_CFG/pandora_agent.conf
update-rc.d -f pandora_agent_daemon remove

View File

@ -0,0 +1,51 @@
#!/bin/sh
# **********************************************************************
# Pandora FMS Agent Daemon launcher for FreeBSD
# (c) 2010 Junichi Satoh <junichi@rworks.jp>
#
# **********************************************************************
# PROVIDE: pandora_agent
# REQUIRE: LOGIN
# KEYWORD: shutdown
# Add the following line to /etc/rc.conf to enable `pandora_agent':
#
# pandora_agent_enable="YES"
#
. "/etc/rc.subr"
name="pandora_agent"
rcvar=`set_rcvar`
# read configuration and set defaults
pandora_agent_enable=${pandora_agent_enable:-"NO"}
load_rc_config "$name"
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin
command=/usr/local/bin/pandora_agent
command_args="/usr/local/etc/pandora &"
pidfile=/var/run/$name.pid
required_files="/usr/local/etc/pandora/pandora_agent.conf"
start_postcmd=start_postcmd
stop_postcmd=stop_postcmd
procname="/usr/bin/perl"
start_postcmd()
{
sleep 1
PANDORA_PID=`pgrep -f -j none $name`
echo $PANDORA_PID > $pidfile
}
stop_postcmd()
{
rm -f $pidfile
}
run_rc_command "$1"

View File

@ -0,0 +1,213 @@
# Base config file for Pandora FMS agents
# Version 3.2, FreeBSD Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2010 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
# General Parameters
# ==================
server_ip localhost
server_path /var/spool/pandora/data_in
temporal /tmp
logfile /var/log/pandora/pandora_agent.log
#include /etc/pandora/pandora_agent_alt.conf
#broker_agent name_agent
# Interval in seconds, 300 by default
interval 300
# Debug mode only generate XML, and stop after first execution,
# and does not copy XML to server.
debug 0
# By default, agent takes machine name
#agent_name adama
#Parent agent_name
#parent_agent_name parent_name
# Agent description
#description Demo agent
# Group assigned for this agent (descriptive, p.e: Servers)
#group Servers
# Autotime: Enforce to server to ignore timestamp coming from this
# agent, used when agents has no timer or it's inestable. 1 to enable
# this feature
# autotime 1
# Timezone offset: Difference with the server timezone
#timezone_offset 0
# Agent position paramters
# Those parameters define the geographical position of the agent
# latitude
#latitude 0
# longitude
#longitude 0
# altitude
#altitude 0
#Position description
#position_description Madrid, centro
# By default agent try to take default encoding defined in host.
# encoding iso-8859-15
# Listening TCP port for remote server. By default is 41121 (for tentacle)
# if you want to use SSH use 22, and FTP uses 21.
server_port 41121
# Transfer mode: tentacle, ftp, ssh or local
transfer_mode tentacle
# Server password (Tentacle or FTP). Leave empty for no password (default).
# server_pwd mypassword
# Set to yes/no to enable/disable OpenSSL support for Tentacle (disabled by default).
# server_ssl no
# Extra options for the Tentacle client (for example, server_opts "-v -r 5").
# server_opts
# delayed_startup defines number of seconds before start execution
# for first time when startup Pandora FMS Agent
# delayed_startup 10
# Pandora nice defines priority of execution. Less priority means more intensive execution
# A recommended value is 10. 0 priority means no Pandora CPU protection enabled (default)
# pandora_nice 0
# Cron mode replace Pandora FMS own task schedule each XX interval seconds by the use
# of old style cron. You should add to crontab Pandora FMS agent script to use this mode.
# This is disabled by default, and is not recommended. Use Pandora FMS internal scheduler
# is much more safe.
# cron_mode
# If set to 1 allows the agent to be configured via the web console (Only Enterprise version)
# remote_config 1
# If set to 1 start Drone Agent's Proxy Mode
# proxy_mode 1
# Max number of simmultaneus connection for proxy (by default 10)
# proxy_max_connection 10
# Proxy timeout (by default 1s)
# proxy_timeout 1
# Number of threads to execute modules in parallel
#agent_threads 1
# User the agent will run as
#pandora_user root
# Secondary server configuration
# ==============================
# If secondary_mode is set to on_error, data files are copied to the secondary
# server only if the primary server fails. If set to always, data files are
# always copied to the secondary server.
# secondary_mode on_error
# secondary_server_ip localhost
# secondary_server_path /var/spool/pandora/data_in
# secondary_server_port 41121
# secondary_transfer_mode tentacle
# secondary_server_pwd mypassword
# secondary_server_ssl no
# secondary_server_opts
# Module Definition
# =================
# System information
# vmstat syntax depends on system configuration, please check before use it
module_begin
module_name cpu_user
module_type generic_data
module_interval 1
module_exec vmstat -n0 1 2 | tail -1 | awk '{ print $15 }'
module_max 100
module_min 0
module_description User CPU Usage (%)
module_end
module_begin
module_name cpu_system
module_type generic_data
module_interval 1
module_exec vmstat -n0 1 2 | tail -1 | awk '{ print $16 }'
module_max 100
module_min 0
module_description System CPU Usage (%)
module_end
module_begin
module_name cpu_idle
module_type generic_data
module_interval 1
module_exec vmstat -n0 1 2 | tail -1 | awk '{ print $17 }'
module_max 100
module_min 0
module_description CPU Idle (%)
module_end
module_begin
module_name Load Average
module_type generic_data
module_exec uptime | cut -d "," -f 4 | cut -d ":" -f 2 | sed "s/ //g"
module_description Average process in CPU (Last minute)
module_end
module_begin
module_name disk_root_free
module_type generic_data
module_exec df -kh / | tail -1 | awk '{ print 100-$5 }'
module_max 100
module_min 0
module_description Free disk Percentage of root partition
module_end
module_begin
module_name memfree
module_type generic_data
module_exec vmstat -H 1 2 | tail -1 | awk '{print $5}'
module_description Unused RAM memory
module_end
module_begin
module_name proctotal
module_type generic_data
module_exec ps -A | wc -l | sed "s/ //g"
module_end
# Process information
module_begin
module_name sshDaemon
module_type generic_proc
module_exec ps -Af | grep sshd | grep -v "grep" | wc -l | sed "s/ //g"
module_end
# Async data example
module_begin
module_name LastLogin
module_type async_string
module_exec last | head -1
module_end
# Plugin example
# This parses /var/log/auth.log file, under the module name "syslog"
# And search for "sshd" string into it, sending only that information.
module_plugin grep_log /var/log/auth.log Syslog sshd
# Plugin for inventory on the agent (Only Enterprise)
# module_plugin inventory 1 cpu ram video nic hd cdrom software

View File

@ -0,0 +1,184 @@
# Base config file for Pandora FMS agents
# Version 3.0, HP-UX Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
# General Parameters
# ==================
server_ip localhost
server_path /var/spool/pandora/data_in
temporal /tmp
logfile /var/log/pandora/pandora_agent.log
#include /etc/pandora/pandora_agent_alt.conf
#broker_agent name_agent
# Interval in seconds, 300 by default
interval 300
# Debug mode only generate XML, and stop after first execution,
# and does not copy XML to server.
debug 0
# By default, agent takes machine name
#agent_name xxxxxx
# Agent description
#description Demo agent
# Group assigned for this agent (descriptive, p.e: Servers)
#group Servers
# Autotime: Enforce to server to ignore timestamp coming from this
# agent, used when agents has no timer or it's inestable. 1 to enable
# this feature
# autotime 1
# Timezone offset: Difference with the server timezone
#timezone_offset 0
# Agent position paramters
# Those parameters define the geographical position of the agent
# latitude
#latitude 0
# longitude
#longitude 0
# altitude
#altitude 0
# By default agent try to take default encoding defined in host.
# encoding iso-8859-15
# Listening TCP port for remote server. By default is 41121 (for tentacle)
# if you want to use SSH use 22, and FTP uses 21.
server_port 41121
# Transfer mode: tentacle, ftp, ssh or local
transfer_mode tentacle
# Server password (Tentacle or FTP). Leave empty for no password (default).
# server_pwd mypassword
# Set to yes/no to enable/disable OpenSSL support for Tentacle (disabled by default).
# server_ssl no
# Extra options for the Tentacle client (for example, server_opts "-v -r 5").
# server_opts
# delayed_startup defines number of seconds before start execution
# for first time when startup Pandora FMS Agent
# delayed_startup 10
# Pandora nice defines priority of execution. Less priority means more intensive execution
# A recommended value is 10. 0 priority means no Pandora CPU protection enabled (default)
# pandora_nice 0
# Cron mode replace Pandora FMS own task schedule each XX interval seconds by the use
# of old style cron. You should add to crontab Pandora FMS agent script to use this mode.
# This is disabled by default, and is not recommended. Use Pandora FMS internal scheduler
# is much more safe.
# cron_mode
# If set to 1 allows the agent to be configured via the web console (Only Enterprise version)
# remote_config 1
# If set to 1 start Drone Agent's Proxy Mode
# proxy_mode 1
# Max number of simmultaneus connection for proxy (by default 10)
# proxy_max_connection 10
# Proxy timeout (by default 1s)
# proxy_timeout 1
# User the agent will run as
#pandora_user root
# Secondary server configuration
# ==============================
# If secondary_mode is set to on_error, data files are copied to the secondary
# server only if the primary server fails. If set to always, data files are
# always copied to the secondary server.
# secondary_mode on_error
# secondary_server_ip localhost
# secondary_server_path /var/spool/pandora/data_in
# secondary_server_port 41121
# secondary_transfer_mode tentacle
# secondary_server_pwd mypassword
# secondary_server_ssl no
# secondary_server_opts
# Module Definition
# =================
# System information
# All this commands has been tested on a Standard HP-UX B.11.31
module_begin
module_name disk_usage_/
module_type generic_data
module_exec df -P | grep -e "/$" | awk '{print $5}' | tr -d %
module_description Disk usage on / (%)
module_end
module_begin
module_name disk_usage_/var
module_type generic_data
module_exec df -P | grep -e "/var$" | awk '{print $5}' | tr -d %
module_description Disk usage on / var(%)
module_end
module_begin
module_name proctotal
module_type generic_data
module_exec ps -ex | wc -l | awk '{ print $1 }'
module_end
module_begin
module_name sshDaemon
module_type generic_proc
module_exec ps -Af | grep "sshd" | grep -v "grep" | wc -l | awk '{ print $1 }'
module_end
# Async data example
module_begin
module_name LastLogin
module_type async_string
module_exec last | head -1
module_end
module_begin
module_name Swap_Free
module_type generic_data
module_exec /usr/sbin/swapinfo -t | grep memory | tr -d "%" | awk '{ print 100-$5 }'
module_description Unused swap memory
module_end
module_begin
module_name RAM_Free
module_type generic_data
module_exec /usr/sbin/swapinfo -t | grep memory | awk '{print $4}'
module_description Unused RAM memory
module_end
module_begin
module_name CPU_User
module_type generic_data
module_exec vmstat 1 2 | tail -1 | awk '{ print $16 }'
module_description % of USER CPU
module_end
module_begin
module_name CPU_System
module_type generic_data
module_exec vmstat 1 2 | tail -1 | awk '{ print $17 }'
module_description % of system CPU
module_end
module_plugin grep_log /var/adm/syslog/syslog.log Syslog .

View File

@ -0,0 +1,303 @@
# Base config file for Pandora FMS agents
# Version 3.0, GNU/Linux
# Licensed under GPL license v2,
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
# General Parameters
# ==================
server_ip localhost
server_path /var/spool/pandora/data_in
temporal /tmp
logfile /var/log/pandora/pandora_agent.log
#include /etc/pandora/pandora_agent_alt.conf
#broker_agent name_agent
# Interval in seconds, 300 by default
interval 300
# Debug mode only generate XML, and stop after first execution,
# and does not copy XML to server.
debug 0
# Optional. UDP Server to receive orders from outside
# By default is disabled, set 1 to enable
# Set port (41122 by default)
# Set address to restrict who can order a agent restart (0.0.0.0 = anybody)
#
udp_server 0
udp_server_port 41122
udp_server_auth_address 0.0.0.0
# By default, agent takes machine name
#agent_name adama
#Parent agent_name
#parent_agent_name caprica
# Agent description
#description This is a demo agent for Linux
# Group assigned for this agent (descriptive, p.e: Servers)
#group Servers
# address: Enforce to server a ip address to this agent
# You can also try to detect the first IP using "auto", for example
#address auto
# or setting a fixed IP address, like for example:
#address 192.168.36.73
# Autotime: Enforce to server to ignore timestamp coming from this
# agent, used when agents has no timer or it's inestable. 1 to enable
# this feature
#autotime 1
# Timezone offset: Difference with the server timezone
#timezone_offset 0
# Agent position paramters
# Those parameters define the geographical position of the agent
# gis_exec: Call a script that returns a string with a fixed
# format of latitude,longitude,altitude
# i.e.: 41.377,-5.105,2.365
#gis_exec /tmp/gis.sh
# This sets the GIS coordinates as fixed values:
# latitude
#latitude 0
# longitude
#longitude 0
# altitude
#altitude 0
#GPS Position description
#position_description Madrid, centro
# By default agent try to take default encoding defined in host.
#encoding iso-8859-15
# Listening TCP port for remote server. By default is 41121 (for tentacle)
# if you want to use SSH use 22, and FTP uses 21.
server_port 41121
# Transfer mode: tentacle, ftp, ssh or local
transfer_mode tentacle
# Server password (Tentacle or FTP). Leave empty for no password (default).
#server_pwd mypassword
# Set to yes/no to enable/disable OpenSSL support for Tentacle (disabled by default).
#server_ssl no
# Extra options for the Tentacle client (for example, server_opts "-v -r 5").
#server_opts
# delayed_startup defines number of seconds before start execution
# for first time when startup Pandora FMS Agent
#delayed_startup 10
# Pandora nice defines priority of execution. Less priority means more intensive execution
# A recommended value is 10. 0 priority means no Pandora CPU protection enabled (default)
#pandora_nice 0
# Cron mode replace Pandora FMS own task schedule each XX interval seconds by the use
# of old style cron. You should add to crontab Pandora FMS agent script to use this mode.
# This is disabled by default, and is not recommended. Use Pandora FMS internal scheduler
# is much more safe
#cron_mode
# If set to 1 allows the agent to be configured via the web console (Only Enterprise version)
#remote_config 1
# If set to 1 start Drone Agent's Proxy Mode
# proxy_mode 1
# Max number of simmultaneus connection for proxy (by default 10)
# proxy_max_connection 10
# Proxy timeout (by default 1s)
# proxy_timeout 1
# Number of threads to execute modules in parallel
#agent_threads 1
# User the agent will run as
#pandora_user root
# Enable or disable XML buffer.
# If you are in a secured environment and want to enable the XML buffer you
# should consider changing the temporal directory, since /tmp is world writable.
#xml_buffer 0
# Minimum available bytes in the temporal directory to enable the XML buffer
#temporal_min_size 1024
# Secondary server configuration
# ==============================
# If secondary_mode is set to on_error, data files are copied to the secondary
# server only if the primary server fails. If set to always, data files are
# always copied to the secondary server.
#secondary_mode on_error
#secondary_server_ip localhost
#secondary_server_path /var/spool/pandora/data_in
#secondary_server_port 41121
#secondary_transfer_mode tentacle
#secondary_server_pwd mypassword
#secondary_server_ssl no
#secondary_server_opts
# Module Definition
# =================
# System information
# vmstat syntax depends on linux distro and vmstat command version, please check before use it
module_begin
module_name cpu_user
module_type generic_data
module_interval 1
module_exec vmstat 1 2 | tail -1 | awk '{ print $13 }'
module_max 100
module_min 0
module_description User CPU Usage (%)
module_min_warning 70
module_max_warning 90
module_min_critical 91
module_max_critical 100
module_unit %
module_end
#Get load average
module_begin
module_name Load Average
module_type generic_data
module_exec cat /proc/loadavg | cut -d' ' -f1
module_description Average process in CPU (Last minute)
module_end
#Get free memory in MB
module_begin
module_name Cache mem free
module_type generic_data
module_exec free -m | grep buffers/cache | awk '{print $4}'
module_description Free cache memory in MB
module_min_warning 500
module_max_warning 600
module_min_critical 100
module_max_critical 499
module_unit MB
module_end
#Count total number of processes
module_begin
module_name proctotal
module_type generic_data
module_exec ps -A | tail --lines=+5 | wc -l
module_description Total processes
module_min_warning 150
module_max_warning 249
module_min_critical 250
module_max_critical 300
module_unit processes
module_end
# Process information
module_begin
module_name sshDaemon
module_type generic_proc
module_exec ps -Af | grep sshd | grep -v "grep" | wc -l
module_description Check ssh service
module_end
# Async data example
module_begin
module_name LastLogin
module_type async_string
module_exec last | head -1
module_description Monitor last user loggin
module_end
# Module that get the number of cron file
# This module uses a precondition, if cron is running the
# module will check the folder /etc/cron.d to get the number of files
module_begin
module_name Cron task files
module_type async_string
module_precondition =~ .*cron.* ps aux | grep cron
module_exec ls -l /etc/cron.d | awk 'NR>1 {print $0}' | wc -l
module_description Number of cron task files
module_unit files
module_end
# Plugin example
# This plugin detects all disk partitions and monitor the free spaces
module_plugin pandora_df
# This parses /var/log/syslog file, under the module name "syslog"
# And search for "ssh" string into it, sending only that information.
module_plugin grep_log /var/log/syslog Syslog ssh
# Get disk space free in MB
#module_begin
#module_name disk_root_free
#module_type generic_data
#module_exec df -kh / | tail -1 | awk '{ print 100-$5 }'
#module_max 100
#module_min 0
#module_description Free disk Percentage of root partition
#module_min_warning 70
#module_max_warning 90
#module_min_critical 91
#module_max_critical 100
#module_end
# This module uses postprocess feature to unit conversion
#module_begin
#module_name memused
#module_type generic_data
#module_exec free -k | grep buffers/cache | awk '{print $3}'
#module_postprocess 0,000976
#module_description Used memory in KB postprocessed to be in MB
#module_end
# Plugin for inventory on the agent (Only Enterprise)
# module_plugin inventory 1 cpu ram video nic hd cdrom software init_services filesystem users process ip route
# Example of preconditions
#module_begin
#module_name Test Precondicion
#module_type generic_data
#module_precondition < 10 echo 5
#module_precondition > 10 echo 15
#module_precondition = 10 echo 10
#module_precondition != 10 echo 5
#module_precondition =~ 10 echo 10
#module_precondition (5,15) echo 10
#module_freepercentmemory
#module_description Precondition test module
#module_end
# Example of postconditions
#module_begin
#module_name Test Postcondicion
#module_type generic_data
#module_condition < 10 echo min >> /tmp/log.txt
#module_condition > 3 echo max >> /tmp/log.txt
#module_condition = 5 echo equal >> /tmp/log.txt
#module_condition != 10 echo diff >> /tmp/log.txt
#module_condition =~ 5 echo regexp >> /tmp/log.txt
#module_condition (3,8) echo range >> /tmp/log.txt
#module_exec echo 5
#module_description Postcondition test module
#module_end

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,33 @@
' df.vbs
' Returns free space for avaible drives.
' --------------------------------------
Option Explicit
On Error Resume Next
' Variables
Dim objWMIService, objItem, colItems, argc, argv, i
' Parse command line parameters
argc = Wscript.Arguments.Count
Set argv = CreateObject("Scripting.Dictionary")
For i = 0 To argc - 1
argv.Add Wscript.Arguments(i), i
Next
' Get drive information
Set objWMIService = GetObject ("winmgmts:\\.\root\cimv2")
Set colItems = objWMIService.ExecQuery ("Select * from Win32_LogicalDisk")
For Each objItem in colItems
If argc = 0 Or argv.Exists(objItem.Name) Then
If objItem.FreeSpace <> "" Then
Wscript.StdOut.WriteLine "<module>"
Wscript.StdOut.WriteLine " <name><![CDATA[" & objItem.Name & "]]></name>"
Wscript.StdOut.WriteLine " <description><![CDATA[Drive " & objItem.Name & " free space in MB]]></description>"
Wscript.StdOut.WriteLine " <data><![CDATA[" & Int(objItem.FreeSpace /1048576) & "]]></data>"
Wscript.StdOut.WriteLine "</module>"
Wscript.StdOut.flush
End If
End If
Next

View File

@ -0,0 +1,38 @@
' df_all.vbs
' Returns free space (%) for all drives
' Pandora FMS Plugin, (c) 2010 Sancho Lerena
' ------------------------------------------
Option Explicit
On Error Resume Next
' Variables
Dim objWMIService, objItem, colItems, argc, argv, i, Percent
' Parse command line parameters
argc = Wscript.Arguments.Count
Set argv = CreateObject("Scripting.Dictionary")
For i = 0 To argc - 1
argv.Add Wscript.Arguments(i), i
Next
' Get drive information
Set objWMIService = GetObject ("winmgmts:\\.\root\cimv2")
Set colItems = objWMIService.ExecQuery ("Select * from Win32_LogicalDisk")
For Each objItem in colItems
If argc = 0 Or argv.Exists(objItem.Name) Then
' Include only harddrivers (type 3)
If (objItem.FreeSpace <> "") AND (objItem.DriveType =3) Then
Percent = round ((objItem.FreeSpace / objItem.Size) * 100, 2)
Wscript.StdOut.WriteLine "<module>"
Wscript.StdOut.WriteLine " <name><![CDATA[DiskFree%_" & objItem.Name & "]]></name>"
Wscript.StdOut.WriteLine " <description><![CDATA[Drive " & objItem.Name & " % free space ]]></description>"
Wscript.StdOut.WriteLine " <data><![CDATA[" & Percent & "]]></data>"
Wscript.StdOut.WriteLine "</module>"
Wscript.StdOut.flush
End If
End If
Next

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,93 @@
' --------------------------------------------------------------
' WMI Log Event Parser for Windows
' Used as Plugin in Pandora FMS Monitoring System
' Written by Sancho Lerena <slerena@gmail.com> 2010
' Licensed under BSD Licence
' --------------------------------------------------------------
' This plugin uses three parameters:
'
' module_name : Module name to be reported at pandora, p.e: Event_Application
' logfile : Windows event logfile: Application, System, Security...
' interval: Should be the same interval agent has, p.e: 300 (seconds)
' Code begins here
' Take args from command line
if (Wscript.Arguments.Count = 0) then
WScript.Quit
end if
On Error Resume Next
cfg_module_name = Wscript.Arguments(0)
cfg_logfile = Wscript.Arguments(1)
cfg_interval = Wscript.Arguments(2)
strComputer = "."
MyDate = dateAdd("s", -cfg_interval, Now) ' Latest X seconds
Set dtmStartDate = CreateObject("WbemScripting.SWbemDateTime")
CONVERT_TO_LOCAL_TIME = TRUE
DateToCheck = CDate(MyDate)
dtmStartDate.SetVarDate DateToCheck, CONVERT_TO_LOCAL_TIME
WMI_QUERY = "Select * from Win32_NTLogEvent Where Logfile = '" & cfg_logfile & "' AND TimeWritten >= '" & dtmStartDate & "'"
' DEBUG
'wscript.StdOut.WriteLine dtmStartDate
'wscript.StdOut.WriteLine WMI_QUERY
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colEvents = objWMIService.ExecQuery (WMI_QUERY)
'The XML files need the have the fields SEVERITY, MESSAGE and
'STACKTRACE. These are the fields that are often used when logging with
'log4j. Just in case, the severity field can have the following values:
'TRACE, DEBUG, INFO, WARN, ERROR, FATAL. The "message" field is just
For Each objEvent in colEvents
if (objEvent.Type = "0") then
severity = "FATAL"
end if
if (objEvent.Type = "1") then
severity = "ERROR"
end if
if (objEvent.Type = "2") then
severity = "WARN"
end if
if (objEvent.Type >= "3") then
severity = "INFO"
end if
stacktrace = "Category: " & objEvent.CategoryString & ", Event Code: " & objEvent.EventCode & ", Source Name: " & objEvent.SourceName & ", LogFile: " & cfg_logfile
event_message = objEvent.Message
Wscript.StdOut.Write "<module>"
Wscript.StdOut.Write "<name><![CDATA[" & cfg_module_name & "]]></name>"
Wscript.StdOut.Write "<type>log4x</type>"
Wscript.StdOut.Write "<severity>" & severity & "</severity>"
if (event_message = "") then
Wscript.StdOut.Write "<message></message>"
else
Wscript.StdOut.Write "<message><![CDATA[" & event_message & "]]></message>"
end if
if (stacktrace = "") then
Wscript.StdOut.Write "<stacktrace></stacktrace>"
else
Wscript.StdOut.Write "<stacktrace><![CDATA[" & stacktrace & "]]></stacktrace>"
end if
Wscript.StdOut.WriteLine "</module>"
Wscript.StdOut.flush
Next
' Code ends here

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,25 @@
Pandora FMS for windows NT4
===========================
This agent is a port of the Unix agent (in perl) compiled with ActiveState DevKit Perl compiler. This is a stand-alone EXE with all the tools it will need to run. It has the same features than the Unix agent, but running on a NT4 box. This means can execute commands and get the output to produce data for Pandora FMS.
Could be used on any Windows machine (NT4, Win95, Windows 2000-2008, and of course Windows 7), could be useful on windows embedded systems without WMI core, which makes standard Pandora FMS windows agent to do not run properly.
Install
=======
Copy all contents on a directory of your choice, for example c:\pandora.
Edit pandora_agent.conf and set your parameters, including the log file and the temporal directory, should be something like c:\pandora\temp and c:\pandora\log. MAKE SURE that directories exists before trying to start Pandora agent.
Run
===
This agent does not run as a service, so you need to install in the startup menu or start by hand. The shortlink you create must have a parameter, which is where is the main Pandora FMS agent directory, in this scenario is c:\pandora, so the command to start will be :
c:\pandora\pandora_agent.exe c:\pandora
Install as a service
====================
srvany.exe tool is provided to do this. Is a microsoft resource kit tool to be able to use any .exe as a service. Just read the documentation about how to use srvany (provided in this package).

View File

@ -0,0 +1,145 @@
# Base config file for Pandora FMS agents
# Version 3.0, GNU/Linux
# Licensed under GPL license v2,
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
# General Parameters
# ==================
server_ip 192.168.50.1
server_path /var/spool/pandora/data_in
temporal c:\pandora\temp
logfile c:\pandora\log\pandora_agent.log
#include c:\pandora\pandora_agent_alt.conf
#broker_agent name_agent
# Interval in seconds, 300 by default
interval 30
# Debug mode only generate XML, and stop after first execution,
# and does not copy XML to server.
debug 0
# Optional. UDP Server to receive orders from outside
# By default is disabled, set 1 to enable
# Set port (41122 by default)
# Set address to restrict who can order a agent restart (0.0.0.0 = anybody)
#
udp_server 1
udp_server_port 41122
udp_server_auth_address 0.0.0.0
# By default, agent takes machine name
# agent_name WinNT4_Test
#Parent agent_name
#parent_agent_name caprica
# Agent description
#description This is a demo agent for Linux
# Group assigned for this agent (descriptive, p.e: Servers)
#group Servers
# Autotime: Enforce to server to ignore timestamp coming from this
# agent, used when agents has no timer or it's inestable. 1 to enable
# this feature
#autotime 1
# Timezone offset: Difference with the server timezone
#timezone_offset 0
# Agent position paramters
# Those parameters define the geographical position of the agent
# latitude
#latitude 0
# longitude
#longitude 0
# altitude
#altitude 0
#Position description
#position_description Madrid, centro
# By default agent try to take default encoding defined in host.
#encoding iso-8859-15
# Listening TCP port for remote server. By default is 41121 (for tentacle)
# if you want to use SSH use 22, and FTP uses 21.
server_port 41121
# Transfer mode: tentacle, ftp, ssh or local
transfer_mode tentacle
# Server password (Tentacle or FTP). Leave empty for no password (default).
#server_pwd mypassword
# Set to yes/no to enable/disable OpenSSL support for Tentacle (disabled by default).
#server_ssl no
# Extra options for the Tentacle client (for example, server_opts "-v -r 5").
#server_opts
# delayed_startup defines number of MINUTES before start execution
# for first time when startup Pandora FMS Agent
#delayed_startup 10
# Pandora nice defines priority of execution. Less priority means more intensive execution
# A recommended value is 10. 0 priority means no Pandora CPU protection enabled (default)
#pandora_nice 0
# Cron mode replace Pandora FMS own task schedule each XX interval seconds by the use
# of old style cron. You should add to crontab Pandora FMS agent script to use this mode.
# This is disabled by default, and is not recommended. Use Pandora FMS internal scheduler
# is much more safe
#cron_mode
# If set to 1 allows the agent to be configured via the web console (Only Enterprise version)
remote_config 1
# Number of threads to execute modules in parallel
#agent_threads 1
# User the agent will run as
#pandora_user root
# Secondary server configuration
# ==============================
# If secondary_mode is set to on_error, data files are copied to the secondary
# server only if the primary server fails. If set to always, data files are
# always copied to the secondary server.
#secondary_mode on_error
#secondary_server_ip localhost
#secondary_server_path /var/spool/pandora/data_in
#secondary_server_port 41121
#secondary_transfer_mode tentacle
#secondary_server_pwd mypassword
#secondary_server_ssl no
#secondary_server_opts
# Module Definition
# =================
# System information
# vmstat syntax depends on linux distro and vmstat command version, please check before use it
module_begin
module_name Disk_Free_C
module_type generic_data
module_exec dir c:\ | grep "bytes [a-z]*" | gawk "{ print $1 }" | tr -d ","
module_end
module_begin
module_name Service_EventLog
module_type generic_proc
module_exec net start | grep "EventLog" | wc -l | tr -d " "
module_end
module_begin
module_name Free_RAM
module_type generic_data
module_exec mem | grep "XMS" | gawk "{ print $1 }"
module_end

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,34 @@
' ps.vbs
' Returns the status of the given processes.
' -----------------------------------------
Option Explicit
'On Error Resume Next
' Variables
Dim objWMIService, objItem, colItems, argc, ps, i
' Get and hash process information
Set objWMIService = GetObject ("winmgmts:\\.\root\cimv2")
Set colItems = objWMIService.ExecQuery ("Select * from Win32_Process")
Set ps = CreateObject("Scripting.Dictionary")
For Each objItem in colItems
if Not ps.Exists(objItem.Name) Then
ps.Add objItem.Name, 1
End If
Next
' Parse command line parameters and check each process
argc = Wscript.Arguments.Count
For i = 0 To argc - 1
Wscript.StdOut.WriteLine "<module>"
Wscript.StdOut.WriteLine " <name><![CDATA[" & Wscript.Arguments(i) & "]]></name>"
Wscript.StdOut.WriteLine " <description><![CDATA[Process " & Wscript.Arguments(i) & " status]]></description>"
If argc = 0 Or ps.Exists(Wscript.Arguments(i)) Then
Wscript.StdOut.WriteLine " <data><![CDATA[" & 1 & "]]></data>"
Else
Wscript.StdOut.WriteLine " <data><![CDATA[" & 0 & "]]></data>"
End If
Wscript.StdOut.WriteLine "</module>"
Wscript.StdOut.flush
Next

View File

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,58 @@
Perl Agent
===========
Dependencies
------------
This is the generic Unix package, developed in Perl. In order to use it, you need to install a few packages first. This will be done using opkg (command line packager tool):
opkg install perl
opkg install perlbase-autoloader
opkg install perlbase-base
opkg install perlbase-config
opkg install perlbase-errno
opkg install perlbase-essential
opkg install perlbase-fcntl
opkg install perlbase-file
opkg install perlbase-hostname
opkg install perlbase-io
opkg install perlbase-posix
opkg install perlbase-selectsaver
opkg install perlbase-socket
opkg install perlbase-symbol
opkg install perlbase-sys
opkg install perlbase-tie
opkg install perlbase-xsloader
opkg install coreutils-nohup
opkg install perlbase-getopt
Install procedure
-----------------
Step 1 - Get the latest package and copy to /tmp, you can get the latest package at:
http://sourceforge.net/projects/pandora/files/Pandora%20FMS%203.2/Stable%20release/Unix%20%28Tarball%29/pandorafms_agent_unix-3.2.tar.gz/download
Note: You will get a special version of the launcher, you can get it from our SVN repository and replace the perl daemon launcher with this special version for OpenWRT. Just replace it after do the package install for the Unix/Perl generic agent.
Step 2 - Install it
cd /tmp
tar xvzf pandorafms_agent_unix-3.2.tar.gz
cd unix
./pandora_agent --install
Step 3 - Create the startup link to run pandora agent when device restarts
ln -s /etc/init.d/pandora_agent_daemon /etc/rc.d/S99pandora_agent
Step 4 - Customize the agent name and server_ip for this device
vi /etc/pandora/pandora_agent.conf
Alter line "agent_name" for the devicename you want
Step 5 - Start it manually:
/etc/init.d/pandora_agent_daemon start

View File

@ -0,0 +1,77 @@
#!/bin/sh
# Pandora FMS Embedded Agent, startup script
# Copyright (c) 2011 Artica ST, <info@artica.es>
# Tested on Busybox 1.13
# v4.0 Build 110122
# http://www.pandorafms.com
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin
PANDORA_PATH=/etc/pandora
DAEMON=/usr/bin/pandora_agent
LOGFILE=/dev/null
# This function replace pidof
# not working in the same way in different linux distros
pidof_pandora() {
COLUMNS=250
PANDORA_PID=`ps | grep $DAEMON | grep -v grep | head -1 | awk '{ print $1 }'`
echo $PANDORA_PID
}
if [ ! -f $DAEMON ]
then
echo "Pandora FMS Agent not found at $DAEMON, please check setup"
exit
fi
case "$1" in
start)
PANDORA_PID=`pidof_pandora`
if [ ! -z "$PANDORA_PID" ]
then
echo "Pandora FMS Agent is currently running on this machine with PID $PANDORA_PID"
echo "Cannot launch again. Aborting."
exit 1
fi
nohup $DAEMON $PANDORA_PATH 2> $LOGFILE &
sleep 1
PANDORA_PID=`pidof_pandora`
echo "Pandora FMS Agent is now running with PID $PANDORA_PID"
;;
stop)
PANDORA_PID=`pidof_pandora`
if [ -z "$PANDORA_PID" ]
then
echo "Pandora FMS Agent is not running, cannot stop it. Aborting now..."
exit 1
else
echo "Stopping Pandora FMS Agent."
kill $PANDORA_PID > /dev/null 2>&1
fi
;;
status)
PANDORA_PID=`pidof_pandora`
if [ -z "$PANDORA_PID" ]
then
echo "Pandora FMS Agent is not running."
else
echo "Pandora FMS Agent is running with PID $PANDORA_PID."
fi
exit 0
;;
force-reload|restart)
$0 stop
sleep 2
$0 start
;;
*)
echo "Usage: /etc/init.d/pandora_agent_daemon {start|stop|restart|status|force-reload}"
exit 1
esac

50
pandora_agents/pc/README Normal file
View File

@ -0,0 +1,50 @@
Pandora FMS : The Flexible Monitoring System
============================================
http://www.pandorafms.org
How to install
--------------
Run this command to see available options:
./pandora_agent_installer
What is Pandora FMS?
--------------------
Pandora FMS is a monitoring application to watch systems and applications.
Pandora FMS allows to know the status of any element of your bussiness systems.
Pandora FMS watches your hardware, your software, your multilayer system and, of
course, your Operating System. Pandora FMS can detect a network interface down
or the movement of any NASDAQ new technology market value. If you wish, Pandora
FMS can send a SMS message when your system or your application fails... or when
Google stock value drops below 330 US$.
Pandora FMS will adjust, like an octopus, to your systems and requirements,
because it has been designed to be open, modular, multiplattform and easy to
customize. Pandora FMS is developed for system administrators.
About the generic Unix agent
----------------------------
This agent is build on Perl and needs the following minimal requisites:
PERL version 5.8 or higher.
By default this minimum OS has all the requisites to run "standalone":
- Linux: Redhat 6, SUSE 5, Debian 2.x and any distro with Perl 5.6
- IBM AIX: 5.1
- Hewlett Packard HPUX: 11.10 or higher. 11.0 comes with Perl 4.0 :(
- Sun Solaris: 2.9. With 2.8 you can install BlastWare Perl 5.8 package, see more
information in our FAQ about how to install Blashware packages.
- Other Unix: TRU, IRIX, etc not tested, if you want to port the agent to this
unixes, please contact with us, we'll glad to port them !!!
License
-------
The project is distributed under the GPL License v2 or later.
Copyright (C) 2004-2011 Pandora FMS development team

View File

@ -0,0 +1,12 @@
This directory contains Pandora FMS agent package builder for Solaris.
To make the Solaris package, execute:
./make_solaris_package.sh
It works with x86/SPARC Solaris 9 or 10.
The package file, named "PandoraFMS-agent-X.X.X.pkg", will be created.
You can install it to Solaris 9 or 10 like this:
pkgadd -d ./PandoraFMS-agent-X.X.X.pkg

View File

@ -0,0 +1,2 @@
Licensed under GPL license v2.
Copyright (c) 2003-2010 Artica Soluciones Tecnologicas

View File

@ -0,0 +1,69 @@
#!/bin/sh
# **********************************************************************
# Pandora FMS Agent package builder for Solaris
# (c) 2010-2011 Junichi Satoh <junichi@rworks.jp>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public License
# as published by the Free Software Foundation; version 2
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# **********************************************************************
AGENT_VERSION="3.2.0"
PKGFILE="PandoraFMS-agent-$AGENT_VERSION.pkg"
# make pkginfo file
DATE=`date '+%Y%m%d%H'`
echo "PKG=PandoraAgent" > pkginfo
echo "NAME=Pandora FMS agent" >> pkginfo
echo "ARCH=all" >> pkginfo
echo "CATEGORY=application" >> pkginfo
echo "VERSION=$AGENT_VERSION" >> pkginfo
echo "VENDOR=http://pandorafms.org/" >> pkginfo
echo "PSTAMP=$DATE" >> pkginfo
echo "CLASSES=none" >> pkginfo
echo "BASEDIR=/" >> pkginfo
# make work directory.
mkdir -p /tmp/pandora/usr/bin
mkdir -p /tmp/pandora/usr/man/man1
mkdir -p /tmp/pandora/etc/pandora
mkdir -p /tmp/pandora/etc/init.d
mkdir -p /tmp/pandora/usr/share/pandora_agent/plugins
# copy executables
cp ../../pandora_agent /tmp/pandora/usr/bin
cp ../../tentacle_client /tmp/pandora/usr/bin
cp ../../tentacle_server /tmp/pandora/usr/bin
cp ../../pandora_agent_daemon /tmp/pandora/etc/init.d
cp ../../pandora_agent_exec /tmp/pandora/usr/bin
# copy plugin files
cp ../../plugins/* /tmp/pandora/usr/share/pandora_agent/plugins
# copy configuration file
cp ../pandora_agent.conf /tmp/pandora/etc/pandora
# copy man pages
cp ../../man/man1/pandora_agent.1.gz /tmp/pandora/usr/man/man1
gunzip /tmp/pandora/usr/man/man1/pandora_agent.1.gz
cp ../../man/man1/tentacle_client.1.gz /tmp/pandora/usr/man/man1
gunzip /tmp/pandora/usr/man/man1/tentacle_client.1.gz
# make package.
pkgmk -o -r /tmp/pandora -d /tmp/pandora
CURRENT_DIR=`pwd`
pkgtrans -s /tmp/pandora $CURRENT_DIR/$PKGFILE PandoraAgent
# delete work files
rm -rf /tmp/pandora
echo ""
echo "pkg file is created: $PKGFILE"

View File

@ -0,0 +1,23 @@
i pkginfo
i copyright
f none usr/bin/pandora_agent 0755 root root
f none usr/bin/tentacle_client 0755 root root
f none usr/bin/tentacle_server 0755 root root
f none usr/bin/pandora_agent_exec 0755 root root
d none usr/share/pandora_agent 0755 root root
d none usr/share/pandora_agent/plugins 0755 root root
f none usr/share/pandora_agent/plugins/files_indir 0755 root root
f none usr/share/pandora_agent/plugins/grep_log 0755 root root
f none usr/share/pandora_agent/plugins/inventory 0755 root root
f none usr/share/pandora_agent/plugins/pandora_df 0755 root root
f none usr/share/pandora_agent/plugins/nagios_plugin_wrapper 0755 root root
f none usr/share/pandora_agent/plugins/pandora_update 0755 root root
d none etc/pandora/ 0755 root root
f none etc/pandora/pandora_agent.conf 0755 root root
f none usr/man/man1/pandora_agent.1 0644 root root
f none usr/man/man1/tentacle_client.1 0644 root root
d none var/spool/pandora 0755 root root
d none var/spool/pandora/data_out 0755 root root
d none var/log/pandora 0755 root root
f none etc/init.d/pandora_agent_daemon 0755 root root
s none etc/rc2.d/S90pandora_agent_daemon=../init.d/pandora_agent_daemon

View File

@ -0,0 +1,193 @@
# Base config file for Pandora FMS agents
# Version 3.0, Solaris Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
# General Parameters
# ==================
server_ip localhost
server_path /var/spool/pandora/data_in
temporal /tmp
logfile /var/log/pandora/pandora_agent.log
#include /etc/pandora/pandora_agent_alt.conf
#broker_agent name_agent
# Interval in seconds, 300 by default
interval 300
# Debug mode only generate XML, and stop after first execution,
# and does not copy XML to server.
debug 0
# By default, agent takes machine name
#agent_name xxxxxx
# Agent description
#description Demo agent
# Group assigned for this agent (descriptive, p.e: Servers)
#group Servers
# Autotime: Enforce to server to ignore timestamp coming from this
# agent, used when agents has no timer or it's inestable. 1 to enable
# this feature
# autotime 1
# Timezone offset: Difference with the server timezone
#timezone_offset 0
# Agent position paramters
# Those parameters define the geographical position of the agent
# latitude
#latitude 0
# longitude
#longitude 0
# altitude
#altitude 0
# By default agent try to take default encoding defined in host.
# encoding iso-8859-15
# Listening TCP port for remote server. By default is 41121 (for tentacle)
# if you want to use SSH use 22, and FTP uses 21.
server_port 41121
# Transfer mode: tentacle, ftp, ssh or local
transfer_mode tentacle
# Server password (Tentacle or FTP). Leave empty for no password (default).
# server_pwd mypassword
# Set to yes/no to enable/disable OpenSSL support for Tentacle (disabled by default).
# server_ssl no
# Extra options for the Tentacle client (for example, server_opts "-v -r 5").
# server_opts
# delayed_startup defines number of seconds before start execution
# for first time when startup Pandora FMS Agent
# delayed_startup 10
# Pandora nice defines priority of execution. Less priority means more intensive execution
# A recommended value is 10. 0 priority means no Pandora CPU protection enabled (default)
# pandora_nice 0
# Cron mode replace Pandora FMS own task schedule each XX interval seconds by the use
# of old style cron. You should add to crontab Pandora FMS agent script to use this mode.
# This is disabled by default, and is not recommended. Use Pandora FMS internal scheduler
# is much more safe.
# cron_mode
# If set to 1 allows the agent to be configured via the web console (Only Enterprise version)
# remote_config 1
# If set to 1 start Drone Agent's Proxy Mode
# proxy_mode 1
# Max number of simmultaneus connection for proxy (by default 10)
# proxy_max_connection 10
# Proxy timeout (by default 1s)
# proxy_timeout 1
# User the agent will run as
#pandora_user root
# Secondary server configuration
# ==============================
# If secondary_mode is set to on_error, data files are copied to the secondary
# server only if the primary server fails. If set to always, data files are
# always copied to the secondary server.
# secondary_mode on_error
# secondary_server_ip localhost
# secondary_server_path /var/spool/pandora/data_in
# secondary_server_port 41121
# secondary_transfer_mode tentacle
# secondary_server_pwd mypassword
# secondary_server_ssl no
# secondary_server_opts
# Module Definition
# =================
# System information
module_begin
module_name disk_root_free
module_type generic_data
module_exec df -k / | tail -1 | tr -d "%" | awk '{ print 100-$5 }'
module_max 100
module_min 0
module_description Free disk Percentage of root partition
module_end
module_begin
module_name proctotal
module_type generic_data
module_exec ps -Alf | wc -l | awk '{ print $1 }'
module_end
module_begin
module_name sshDaemon
module_type generic_proc
module_exec ps -Af | grep sshd | grep -v "grep" | wc -l | awk '{ print $1 }'
module_end
# Async data example
module_begin
module_name LastLogin
module_type async_string
module_exec last | head -1
module_end
module_begin
module_name Swap_Free
module_type generic_data
module_exec vmstat 1 2 | tail -1 | awk '{ print $4 }'
module_description Unused swap memory
module_end
module_begin
module_name RAM_Free
module_type generic_data
module_exec vmstat 1 2 | tail -1 | awk '{ print $5 }'
module_description Unused RAM memory
module_end
module_begin
module_name CPU_User
module_type generic_data
module_exec vmstat 1 2 | tail -1 | awk '{ print $20 }'
module_description % of USER CPU
module_end
module_begin
module_name CPU_System
module_type generic_data
module_exec vmstat 1 2 | tail -1 | awk '{ print $21 }'
module_description % of system CPU
module_end
module_begin
module_name Disk_Seek_Operations
module_type generic_data
module_exec vmstat 1 2 | tail -1 | awk '{ print $14 }'
module_description Disk Seek operations
module_end
module_begin
module_name Pandora_Agent_RAM
module_type generic_data
module_exec ps -Afly | grep perl | grep -v grep | awk '{ print $9 }'
module_description Return size in KB of memory used by process Pandora
module_end
module_plugin grep_log /var/adm/syslog Syslog .

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

Binary file not shown.

View File

@ -0,0 +1,364 @@
Pandora FMS Agents
==================
Please checkout our latest Pandora FMS documentation at http://pandorafms.org
This README file is not intended to be a documentation, only a brief introduction to Pandora FMS windows agent.
Understanding what is a Pandora FMS Agent
-----------------------------------------
Pandora FMS agents collect all system's data. They are executed in each local system, although they can also collect remote information by installing monitoring systems for the agent in several different machines - called satellite agents.
They are developed to work under a given platform, making use of the specific tools of the language being used: VBSCript/Windows Scripting for Microsoft platforms (Win2000, WinXP y Win2003), ShellScripting for UNIX - which includes GNU/Linux, Solaris, AIX, HP-UX and BSD, as well as the Nokia's IPSO. Pandora agents can be developed in virtually any language, given its simple API system and being open source. There are branches of the Pandora project started for the creation of agents in Posix C, Perl and Java for those systems requiring closed agents.
Pandora Agents are Free Software, i.e., the way agents collect and sent information is documented. An agent can be recreated in any programming language, and can be upgraded easily, to improve aspects of the program not covered so far.
This document describes the installation of agents in machines running over Windows and Unix operating systems.
Generic role of the agents
--------------------------
Regardless the platform an agent is running on, this is formed of the following elements: A script (or binary application in Windows) that collects and sends the data to
the server.
One or several configuration files where the values to be collected are defined. The file is called pandora_agent.conf both for Windows and Unix machines.
This simple structure makes it easy the customisation of an agent. There is no need to code again the agent to modify the way it works, as the configuration file holds most of the parameters needed to do so.
Pandora FMS Agent configuration
------------------------------
Main program
~~~~~~~~~~~~
The main script is the executable file that collects the data specified in the configuration file. It sends the data to the server in XML. In Windows machines application is installed as a service and is executed at the time intervals set in the configuration file. In machines running over UNIX the main script is run through a special script called pandora_agent, and runs continuously in the machine as a process.
Configuration File
~~~~~~~~~~~~~~~~~~
The data collection in the host system is the gathering of independent data units, which are defined in the /etc/pandora/pandora_agent.conf file. The pandora_agent.conf file is divided in two parts:
* General parameters: Configure general options about server location, agent name, interval, and other general options.
* Module definitions: Configure and define the method of extraction for each piece of information that will be extracted from local host and sent to Pandora Server.
General parameters
~~~~~~~~~~~~~~~~~~
The general parameters of the agent configuration are defined in this section. Some of these parameters are common for all systems and others specific for Windows or UNIX. The general parameters are:
* server_path: The server path is the full path of the folder where the server stores the data sent by the agent. It is usually /var/spool/pandora/data_in.
* server_ip: The server IP is the IP address or the host name of the Pandora server, where the data will be stored. The host must be reachable and must be listening to port 22 (SSH).
* interval: This is the time interval in seconds in which the agent will collect data from the host system and send the data packages to the server. The recommended value ranges from 300 (5 minutes) to 600 (10 minutes). This number could be larger, although it is important to consider the impact of a larger number on the database.
* debug: This parameter is used to test the generation of data files, forcing the agent to do not copy data file to server, so you can check data file contents and copy XML data file manually. It does not delete any data when the process is finished, so data file will be in temp directory. The activity is written in a log file. The file is named pandora_agent.log. This log file can be used to test the system and to investigate potential issues.
* agent_name: This is an alternative host name. This parameter is optional as if it is not declared the name is obtained directly from the system.
* Transfer Mode: This parametrer let you specify which transfer mode is going to be set up to send the agent data to the server. Modes available are: tentacle (default), ssh (using scp), ftp or local. Local mode it is only for systems where the agent run in the same machine as the server does, cause it is basically a copy between directories.
* server_pwd: Specify password for FTP transfer mode (Windows only).
* encoding: Set the encoding type of your local system, like iso-8859-15, or utf-8.
An example of the general parameters from a Unix configuration would be:
server_ip 192.168.12.12
server_path /var/spool/pandora/data_in
temporal /var/spool/pandora/data_out
interval 300
agent_name dakotaSR01
debug 0
Module definition
-----------------
Each data item that is to be collected must be defined precisely in each module,
using the exact syntax. As many values as necessary can be set to be collected,
adding at the end of the general parameters as many modules as the number of
values to collect. Each module is made of several directives. Following is a
descriptive relation of all module marks available for Unix agents (almost all
of them are applicable to Windows Agent too).
module_begin
Defines the beginning of the module.
module_name <name>
Name of the module. This is the id for this module, choose a name without blank
spaces and not very long. There is no practical limitation (max of 250 chars)
but will be more easier to manage if you use short names. This name CANNOT be
duplicated with a similar name in the same agent. This name could be duplicated
with other modules in other agents.
module_type <type>
Data type the module will handle. There are four data types for agents:
* Numeric (generic_data). Simple numeric data, float or integer. If the
values are of the float type, they will be truncated to their integer value.
* Incremental (generic_date_inc). Integer numeric data equal to the
differential between the actual value and the previous one. When this
differential is negative the value is set to 0.
* Alphanumeric (generic_string). Text strings up to 255 characters.
* Monitors (generic_proc). Stores numerically the status of the processes.
This data type is called monitor because it assigns 0 to an "Incorrect"
status and any value above 0 to any "Correct" status.
module_exec <command>
This is the generic "command to execute" directive. Both, for Unix and Windows
agents there is only one directive to obtain data in a generic way, executing a
single command (you could use pipes for redirecting execution to anoter
command). This directive executes a command and stores the returned value. This
method is also available on Windows agents. This is the "general purpose method"
for both kind of agents.
For a Windows agent there are more directives to obtain data, who are described
following this lines.
module_service <service>
(Win32 Only)
Checks if a given service name is running in this host. Remember to use " "
characters if service name contains blank spaces.
module_proc <process>
(Win32 Only)
Checks if a given processname is running in this host. If the process name
contains blank spaces do not use " ". Also notice that the process name must
have the .exe extension. The module will return the number of process running
with this name.
module_freedisk <drive_letter:>
(Win32 Only)
Checks free disk on drive letter (do not forget ":" after drive letter).
module_cpuusage <cpu id>
(Win32 Only)
Returns CPU usage on CPU number cpu. If you only have one cpu, use 0 as value.
module_freememory
(Win32 Only)
Return free memory in the whole system.
module_min <value>
This is the minimum valid value for the data generated in this module. If the
module has not yet been defined in the web console this value will be taken from
this directive. This directive is not compulsory. This value does not override
the value defined in the agent if the module does not exist in the management
console is created automatically when working on learning mode.
module_max <value>
It is the maximum valid value for the data generated in this module. If the
module has not been defined in the web console this value will be taken from
this directive. This directive is not compulsory and is not supported by the
Windows agent. This value does not override the value defined in the agent if
the module does not exist in the management console. This is created
automatically when working on learning mode.
module_description <text>
This directive is used to add a comment to the module. This directive is not
compulsory. This value does not override the value defined in the agent if the
module does not exist in the management console. This is created automatically
when working on learning mode.
module_interval <factor>
Since Pandora 1.2 introduces this new feature. You can, for each module, setup
its own interval. This interval its calculated as a multiply factor for agent
interval. For example, if your agent has interval 300 (5 minutes), and you want
a module only be calculated each 15 minutes, you could add this line:
module_interval 3. So this module will be calculated each 300sec x 3 = 900sec
(15 minutes).
module_end
Ends module definition
Examples
An example of a Windows module, checking if EventLog service is alive, would be:
module_begin
module_name ServicioReg
module_type generic_proc
module_service Eventlog
module_description Eventlog service availability
module_end
An example of a Unix module would be:
module_begin
module_name cpu_user
module_type generic_data
module_exec vmstat | tail -1 | awk '{ print $14 }'
module_min 0
module_max 100
module_description User CPU
module_end
Agent types
===========
It is possible to monitor virtually any system with Pandora. This can be done
either with a local agent collecting data directly from the system to be
monitored, using a a satellite agent collecting data from a system by SNMP or
using the new Pandora 1.2 agents, the remote agents, who can chack using remote
network polling (TCP, UCP, ICMP/PING and SNMP) remote services, from the Pandora
Network Server.
The local agents can be either Windows or Unix agents. The satellite agents can
be implemented using any of the agents above. The modules are configured to
collect data from the external system by, for example, an SNMPGET tool.
Pandora FMS Windows Agents
--------------------------
Build Pandora FMS Windows Agent from sources
In order to build from sources, you will need the latest Dev-Cpp IDE version,
with the MinGW tools. Download from http://www.bloodshed.net/devcpp.html
Open PandoraService.dev with Dev-Cpp and construct the project. Everything
should compile fine in a default installation.
Manual Pandora FMS Windows Agent installation (without installer)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To install manually (without installer) the Pandora FMS Windows Agent execute
this sentence in a Windows command line:
PandoraService.exe --install
The Agent will be installed into the Windows services system. You can check it on Control Panel -> Administrative tools -> Services.
To run the Agent open the "Services" dialog (Control Panel -> Administrative tools-> Services), search the "Pandora Service" service and run it clicking the play button. To stop the service, open the "Services" dialog, search the "Pandora Service" and click the stop button.
To uninstall the Pandora Windows Agent, execute this sentence in a Windows command line:
PandoraService.exe --uninstall
Windows Agent testing
~~~~~~~~~~~~~~~~~~~~~
You can check the Pandora Windows Agent output in the pandora_debug.log file, that is a plain text file and includes info about the execution flow of the Agent.
To test that SSH is working correctly, you can use the --test-ssh parameter in the executable file. This force pandora to conect using internal SSH and copy a file called "ssh.test".
Windows Agent configuration
~~~~~~~~~~~~~~~~~~~~~~~~~~~
All setup is made in pandora_agent.conf. This file is a list of keys/values pairs. Here is an example of this file.
# General Parameters
# ==================
server_ip 127.0.0.1
server_path /var/spool/pandora/data_in
temporal "c:\windows\temp"
interval 300
agent_name localhost
transfer_mode ftp
server_pwd pandora123
# Module Definition
# =================
# Counting OpenedConnections (check the language string)
module_begin
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
module_service Schedule
module_description Servicio Programador de tareas
module_end
# Is Eventlog service running ?
module_begin
module_name ServicioReg
module_type generic_proc
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 LSASS.exe process.
module_end
# Received packets.
# Please notice that "Paquetes recibidos" string must be replaced by
# the correct string in your Windows system language.
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
# Free space on disk
module_begin
module_name FreeDiskC
module_type generic_data
module_freedisk C:
module_description Free space on drive C:
module_end
# CPU usage percentage
module_begin
module_name CPUUse0
module_type generic_data
module_cpuusage 0
module_description CPU#0 usage
module_end
module_begin
module_name FreeMemory
module_type generic_data
module_freememory
module_description Amount of free memory.
module_end

View File

@ -0,0 +1,53 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Fandora FMS - Generate SSH keys step-by-step</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="author" content="Sancho Lerena, Raul Mateos and others">
<meta name="copyright" content="This is GPL software. Created by Sancho Lerena and others">
</head>
<body>
<center>
<img src="images/logo.png" alt="">
</center>
<h2>Step-by-step generating SSH keys</h2>
From
<a href="http://www.openideas.info/wiki/index.php?title=Pandora:FAQ#How_to_generate_a_pair_of_SSH_keys_for_Pandora_Windows_agent_1.2_.3F">Pandora FMS FAQ</a>.
<ol>
<li>
Go to <code>.\util</code> of your Pandora FMS agent for Windows
and run <code>puttygen.exe</code>.<br>
Generate keys, SSH-2_DSA, 1024:<br><br>
<img src="images/1.jpg"><br><br>
</li>
<li>
Press Generate<br>
Export key to OpenSSH key (Cygwin uses a port of OpenSSH)<br><br>
<img src="images/2.jpg"><br><br>
</li>
<li>
We have no chosen password, so press YES:<br><br>
<img src="images/3.jpg"><br><br>
</li>
<li>
Save it as <code>c:\pandora\keys\id_dsa:</code><br><br>
<img src="images/4.jpg"><br><br>
</li>
<li>
Now let's copy the public key to clipboard:<br><br>
<img src="images/5.jpg"><br><br>
</li>
<li>
and paste it as <code>c:\pandora_agent\keys\id_dsa.pub</code>,
and also to the <code>/home/pandora/.ssh/authorized_keys</code> file.
<br><br>
<img src="images/6.jpg"><br><br>
</li>
</ol>
</body>
</html>

View File

@ -0,0 +1,53 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Pandora FMS - Generación de claves SSH en Windows paso por paso</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="author" content="Sancho Lerena, Raul Mateos y otros">
<meta name="copyright" content="This is GPL software. Created by Sancho Lerena and others">
</head>
<body>
<center>
<img src="images/logo.png" alt="">
</center>
<h2 class="print">Generación de claves SSH en Windows paso por paso</h2>
Extraído de las
<a href="http://www.openideas.info/wiki/index.php?title=Pandora:FAQ_ES#.C2.BF_C.C3.B3mo_puedo_generar_un_par_de_claves_SHH_para_el_agente_para_Windows_1.2_.3F">
FAQ</a>.
<ol>
<li>
Desde el directorio <code>.\util</code> del agente Pandora FMS para
windows ejecutamos <code>puttygen.exe</code>.<br>
Generamos claves SSH-2_DSA, 1024:<br><br>
<img src="images/1.jpg"><br><br>
</li>
<li>
Pulsamos «Generate»
para generar la clave.<br>
Exportamos la clave a formato OpenSSH<br><br>
<img src="images/2.jpg"><br><br>
</li>
<li>
No elegimos contraseña, con lo cual pulsamos «Sí»:<br><br>
<img src="images/3.jpg"><br><br>
</li>
<li>
Guardamos la clave como <code>C:\pandora\keys\id_dsa:</code><br><br>
<img src="images/4.jpg"><br><br>
</li>
<li>
Ahora copiamos la clave pública al portapapeles:<br><br>
<img src="images/5.jpg"><br><br>
</li>
<li>
Pegamos la clave en un nuevo fichero <code>C:\pandora_agent\keys\id_dsa.pub</code>,
y debemos también añadirla al fichero <code>/home/pandora/.ssh/authorized_keys</code>.
<br><br>
<img src="images/6.jpg"><br><br>
</li>
</ol>
</body></html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -0,0 +1,124 @@
# Pandora FMS Agent NT library
# Retrieve system information using the NT library whenever possible.
package PandoraNT;
use strict;
use warnings;
use Win32::SystemInfo;
use Win32::SystemInfo::CpuUsage;
use Win32::Service;
use Win32::DriveInfo;
use Win32::Process::List;
########################################################################################
# PandoraNT class constructor.
########################################################################################
sub new ($) {
my $class = shift;
my $self = {};
bless $self, $class;
return $self;
}
# Get CPU load percentage
sub get_cpu_usage ($) {
my $self = shift;
return Win32::SystemInfo::CpuUsage::getCpuUsage(500);
}
# Get memory usage in MBytes
sub get_free_memory ($) {
my $self = shift;
my %mem = ('TotalPhys' => 0, 'AvailPhys' => 0);
if (! Win32::SystemInfo::MemoryStatus(%mem, "MB")) {
return undef;
}
return $mem{'AvailPhys'};
}
# Get memory usage percentage
sub get_free_memory_percentage ($) {
my $self = shift;
my %mem = ('TotalPhys' => 0, 'AvailPhys' => 0);
if (! Win32::SystemInfo::MemoryStatus(%mem, "MB")) {
return undef;
}
return 0 unless ($mem{'TotalPhys'} > 0);
return $mem{'AvailPhys'} * 100.0 / $mem{'TotalPhys'};
}
# Get process status (1 running, 0 not running)
sub get_process_status ($$) {
my ($self, $process_name) = @_;
# Retrieve process information
# TODO: reuse the process list between modules
my $p = Win32::Process::List->new();
my %list = $p->GetProcesses();
my $pid = $p->GetProcessPid("$process_name");
return 0 unless (defined ($pid));
return 1;
}
# Get service status (1 running, 0 not running)
sub get_service_status ($$) {
my ($self, $service_name) = @_;
my %status;
Win32::Service::GetStatus('localhost', $service_name, \%status);
# Service does not exist
return 0 unless (defined ($status{'CurrentState'}));
# Service is not running
# See http://msdn.microsoft.com/en-us/library/windows/desktop/ms685996(v=vs.85).aspx
return 0 unless ($status{'CurrentState'} == 4);
return 1;
}
# Get free disk space in MBytes
sub get_free_disk_space ($$) {
my ($self, $device_id) = @_;
my ($SectorsPerCluster,
$BytesPerSector,
$NumberOfFreeClusters,
$TotalNumberOfClusters,
$FreeBytesAvailableToCaller,
$TotalNumberOfBytes,
$TotalNumberOfFreeBytes) = Win32::DriveInfo::DriveSpace($device_id);
return 0 unless (defined ($TotalNumberOfFreeBytes));
# Convert to MBytes (1048576 = 1024 * 1024)
return $TotalNumberOfFreeBytes / 1048576.0;
}
# Get free disk space percentage
sub get_free_disk_space_percentage ($$) {
my ($self, $device_id) = @_;
my ($SectorsPerCluster,
$BytesPerSector,
$NumberOfFreeClusters,
$TotalNumberOfClusters,
$FreeBytesAvailableToCaller,
$TotalNumberOfBytes,
$TotalNumberOfFreeBytes) = Win32::DriveInfo::DriveSpace($device_id);
return 0 unless (defined ($TotalNumberOfFreeBytes) && defined ($TotalNumberOfBytes));
return $TotalNumberOfFreeBytes * 100.0 / $TotalNumberOfBytes;
}
1;
__END__

View File

@ -0,0 +1,125 @@
# Pandora FMS Agent WMI library.
package PandoraWMI;
use strict;
use warnings;
use DBI;
use DBD::WMI;
########################################################################################
# PandoraWMI class constructor.
########################################################################################
sub new ($) {
my $class = shift;
my $self = {};
bless $self, $class;
return $self;
}
# Return a WQL safe string
sub safe_wql_string ($) {
my $string = shift;
# Remove characters that may break the query
$string =~s/'//g;
return $string;
}
# Return an array of values from a WMI query
sub get_row ($@) {
my ($query, @values) = @_;
my $dbh = DBI->connect('dbi:WMI:');
return undef unless defined ($dbh);
my $sth = $dbh->prepare($query);
return undef unless defined ($sth);
$sth->execute(@values);
return undef unless defined ($sth);
while (my @row = $sth->fetchrow()) {
return @row;
}
$sth->finish();
return undef;
}
# Get CPU load percentage
sub get_cpu_usage ($) {
my $self = shift;
my ($load_percentage) = get_row ('SELECT LoadPercentage FROM Win32_Processor');
return $load_percentage;
}
# Get memory usage in MBytes
sub get_free_memory ($) {
my $self = shift;
my ($available_mbytes) = get_row ('SELECT AvailableMBytes FROM Win32_PerfRawData_PerfOS_Memory');
return $available_mbytes;
}
# Get memory usage percentage
sub get_free_memory_percentage ($) {
my $self = shift;
my ($free_memory, $total_memory) = get_row ('SELECT FreePhysicalMemory, TotalVisibleMemorySize FROM Win32_OperatingSystem');
return undef unless (defined ($free_memory) && defined ($total_memory));
return 0 unless ($total_memory > 0);
return $free_memory * 100.0 / $total_memory;
}
# Get process status (1 running, 0 not running)
sub get_process_status ($$) {
my ($self, $process_name) = @_;
my ($name) = get_row ("SELECT Name FROM Win32_Process WHERE Name='" . safe_wql_string ($process_name) . "'");
return 0 unless (defined ($name));
return 1;
}
# Get service status (1 running, 0 not running)
sub get_service_status ($$) {
my ($self, $service_name) = @_;
my ($state) = get_row ("SELECT State FROM Win32_Service WHERE Name='" . safe_wql_string ($service_name) . "'");
return 0 unless (defined ($state));
# Running!
return 1 if ($state eq 'Running');
return 0;
}
# Get free disk space in MBytes
sub get_free_disk_space ($$) {
my ($self, $device_id) = @_;
my ($free_space) = get_row ("SELECT FreeSpace FROM Win32_LogicalDisk WHERE DeviceID='" . safe_wql_string ($device_id) . "'");
return 0 unless (defined ($free_space));
# Convert to MBytes (1048576 = 1024 * 1024)
return $free_space / 1048576.0;
}
# Get free disk space percentage
sub get_free_disk_space_percentage ($$) {
my ($self, $device_id) = @_;
my ($size, $free_space) = get_row ("SELECT Size, FreeSpace FROM Win32_LogicalDisk WHERE DeviceID='" . safe_wql_string ($device_id) . "'");
return 0 unless (defined ($size) && defined ($free_space));
return 0 unless ($size > 0);
return $free_space * 100.0 / $size;
}
1;
__END__

View File

@ -0,0 +1,76 @@
# Pandora FMS AgentWin32 monitoring library.
package PandoraWin32;
use strict;
use warnings;
use PandoraWMI;
use PandoraNT;
########################################################################################
# PandoraWin32 class constructor.
########################################################################################
sub new ($$) {
my ($class, $lib) = @_;
my $self = { '_lib_' => undef };
if ($lib =~ /NT/i) {
$self->{'_lib_'} = PandoraNT->new ();
} else {
$self->{'_lib_'} = PandoraWMI->new ();
}
bless $self, $class;
return $self;
}
# Get CPU load percentage
sub get_cpu_usage ($) {
my $self = shift;
return $self->{'_lib_'}->get_cpu_usage ();
}
# Get memory usage in MBytes
sub get_free_memory ($) {
my $self = shift;
return $self->{'_lib_'}->get_free_memory ();
}
# Get memory usage percentage
sub get_free_memory_percentage ($) {
my $self = shift;
return $self->{'_lib_'}->get_free_memory_percentage ();
}
# Get process status (1 running, 0 not running)
sub get_process_status ($$) {
my ($self, $process_name) = @_;
return $self->{'_lib_'}->get_process_status ($process_name);
}
# Get service status (1 running, 0 not running)
sub get_service_status ($$) {
my ($self, $service_name) = @_;
return $self->{'_lib_'}->get_service_status ($service_name);
}
# Get free disk space in MBytes
sub get_free_disk_space ($$) {
my ($self, $device_id) = @_;
return $self->{'_lib_'}->get_free_disk_space ($device_id);
}
# Get free disk space percentage
sub get_free_disk_space_percentage($$) {
my ($self, $device_id) = @_;
return $self->{'_lib_'}->get_free_disk_space_percentage ($device_id);
}
1;
__END__

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -0,0 +1,348 @@
# Base config file for Pandora FMS Windows Agent
# (c) 2006-2010 Artica Soluciones Tecnologicas
# version 3.2
# This program is Free Software, you can redistribute it and/or modify it
# under the terms of the GNU General Public Licence as published by the Free Software
# Foundation; either version 2 of the Licence or any later version
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY, without ever the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE
# Edit this file to change your parameters or/and add your own modules
# Any line with a # character at the first column will be ignored (comment)
# General Parameters
# ==================
# NOTE: The variables $*$ will be substituted in the installation wizard
server_ip $ServerIP$
server_path $ServerPath$
temporal $AgentTemp$
logfile $AgentLog$
#include "C:\Archivos de programa\pandora_agent\pandora_agent_alt.conf"
#broker_agent name_agent
# Agent uses your hostname automatically, if you need to change agent name
# use directive agent_name (do not use blank spaces, please).
# This parameter is CASE SENSITIVE.
# agent_name My_Custom_Agent_name
#Parent agent_name
#parent_agent_name caprica
# address: Enforce to server a ip address to this agent
# You can also try to detect the first IP using "auto", for example
#address auto
# or setting a fixed IP address, like for example:
#address 192.168.36.73
# Group assigned for this agent (descriptive, p.e: Servers)
group $AgentGroup$
# This limits operation if temporal dir has not enough free disk.
#temporal_min_size 1024
# Delay start execution X second before start to minonitoring nothing
#startup_delay 30
# Interval is defined in seconds
interval 300
# tranfer_modes: Possible values are local, tentacle (default), ftp and ssh.
transfer_mode tentacle
server_port 41121
# In case of using FTP or tentacle with password. User is always "pandora"
#server_pwd pandora
# Debug mode do not copy XML data files to server.
# debug 1
# ODBC connections. Check documentation for more information.
# Configuring "ExampleDSN" DSN. Notice that this DSN connection must be configured
# under Control panel -> Administrative tools -> ODBC -> DSN
# odbc_ExampleDSN_username UserNameForDsn
# odbc_ExampleDSN_password Password1234
# If set to 1 allows the agent to be configured via the web console
# (only works on enterprise version).
# remote_config 1
# Set XML encoding (ISO-8859-1 by default).
#encoding ISO-8859-1
# If set to 1 start Drone Agent's Proxy Mode
# proxy_mode 1
# Max number of simmultaneus connection for proxy (by default 10)
# proxy_max_connection 10
# Proxy timeout (by default 1s)
# proxy_timeout 1
# Enable or disable XML buffer.
xml_buffer 0
# WMI by default. Set to NT if you don't want to use WMI.
win32_monitoring_lib NT
# Secondary server configuration
# ==============================
# If secondary_mode is set to on_error, data files are copied to the secondary
# server only if the primary server fails. If set to always, data files are
# always copied to the secondary server.
#secondary_mode on_error
#secondary_server_ip localhost
#secondary_server_path /var/spool/pandora/data_in
#secondary_server_port 41121
#secondary_transfer_mode tentacle
#secondary_server_pwd mypassword
#secondary_server_ssl no
#secondary_server_opts
# Module Definition
# Check online documentation and module library at http://pandorafms.org
# =================
# CPU Load using WMI
module_begin
module_name CPU Load
module_type generic_data
module_wmiquery SELECT LoadPercentage FROM Win32_Processor
module_wmicolumn LoadPercentage
module_description CPU Load (%)
module_min_warning 80
module_max_warning 90
module_min_critical 91
module_max_critical 100
module_end
# Number processes
module_begin
module_name Number processes
module_type generic_data
module_exec tasklist | gawk "NR > 3 {print$0}" | wc -l
module_description Number of processes running
module_min_warning 175
module_max_warning 249
module_min_critical 250
module_max_critical 300
module_end
# Free Memory
module_begin
module_name FreeMemory
module_type generic_data
module_freepercentmemory
module_description Free memory (%).
module_min_warning 21
module_max_warning 30
module_min_critical 0
module_max_critical 20
module_end
# Log events
module_begin
module_name System Events (TermService)
module_type async_string
module_logevent
module_description Log Events coming from Terminal Service
module_source System
module_application TermService
module_end
module_begin
module_name Security Events (Invalid Login)
module_type async_string
module_description Security log events for invalid login attempt
module_logevent
module_source Security
module_eventcode 529
module_end
# Check if Dhcp service is enabled
module_begin
module_name DHCP Enabled
module_type generic_proc
module_service Dhcp
module_description Check DCHP service enabled
module_end
#Antivirus monitoring
#This modules checks the antivirus is running on your system, if there is and antivirus
#This module gets the last date the signature file was updated and send this date to pandora.
module_begin
module_name Antivirus Last Update
module_type async_string
module_precondition =~ avguard.exe cmd.exe /c tasklist | grep avguard.exe | gawk "{print $1}"
module_exec dir "%ProgramFiles%\Avira\AntiVir Desktop\aevdf.dat" | grep aevdf.dat | gawk "{print $1\" \"$2}"
module_description Last update for Antivirus Signature file
module_end
# Example plugin to retrieve drive usage
module_plugin cscript.exe //B "%ProgramFiles%\Pandora_Agent\util\df.vbs"
# Free space on disk C: (%)
#module_begin
#module_name FreeDiskC
#module_type generic_data
#module_freepercentdisk C:
#module_description Free space on drive C: (%)
#module_min_warning 31
#module_max_warning 40
#module_min_critical 0
#module_max_critical 30
#module_end
# CPU usage percentage
#module_begin
#module_name CPUUse
#module_type generic_data
#module_cpuusage all
#module_description CPU# usage
#module_min_warning 70
#module_max_warning 90
#module_min_critical 91
#module_max_critical 100
#module_end
# Free space on disk D: (%)
# module_begin
# module_name FreeDiskD
# module_type generic_data
# module_freepercentdisk D:
# module_description Free space on drive D: (%)
# module_end
# Sample of Windows inventory module (ONLY ENTERPRISE)!
#module_begin
#module_name Inventory
#module_interval 7
#module_type generic_data_string
#module_inventory CPU RAM CDROM Video HD Patches Software Services NIC
#module_description Inventory
#module_end
# Example plugin to retrieve last 5 min events in log4x format
# module_plugin cscript.exe //B "%ProgramFiles%\Pandora_Agent\util\logevent_log4x.vbs" Aplicacion System 300
# Sample on how to get a value from registry
# This returns the last time user launch microsoft Windows update
#module_begin
#module_name Windows_Update_LastRun
#module_type generic_data_string
#module_exec getreg LM "SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" SetupWizardLaunchTime
#module_description Last date and time user launch microsoft Windows update
#module_end
# Example of a remote TCP check
#module_begin
#module_name Google Port 80
#module_type generic_proc
#module_tcpcheck http://www.google.com
#module_port 80
#module_timeout 5
#module_description Check local port 80
#module_end
# Example of regexp matching
#module_begin
#module_name PandoraAgent_log
#module_type generic_data_string
#module_regexp C:\archivos de programa\pandora_agent\pandora_agent.log
#module_description This module will return all lines from the specified logfile
#module_pattern .*
#module_end
# Get processor time from Performance Counter (SPANISH only, check your
# locale string) using the Windows Performance tool to
# identify proper PerCounter strings. Check documentation for detailed steps.
#module_begin
#module_name Processor_Time
#module_type generic_data
#module_perfcounter \Procesador(_Total)\% de tiempo de procesador
#module_end
# Example of module exec, used to know about the memory used by pandora process
# grep.exe and gawk.exe are included in the util directory of the agent.
#module_begin
#module_name PandoraFMS RAM
#module_type generic_data
#module_exec tasklist | grep Pandora | gawk "{ print $5 }" | tr -d "."
#module_end
# Example of module exec, used get number of active terminal services sessions
# Works on Windows 2003. In Windows XP the query.exe and quser.exe files were
# moved to %WINDIR%\system32\dllcache. If XP, copy the exe to %WINDIR%\system32
#module_begin
#module_name Active TS Sessions
#module_type generic_data_string
#module_exec query session | grep Activ | gawk "{ print $2 }" |wc -l
#module_description Number of active TS Sessions
#module_end
# Example of watchdog process opening it if it gets closed
# NOTE: This need to enable "Service can interactuate with the deskop" option
# in the Pandora FMS Service configuration (Windows Service Control management).
#module_begin
#module_name TaskManager
#module_type generic_proc
#module_proc taskmgr.exe
#module_description This keeps taskmgr always running in the system
#module_async yes
#module_watchdog yes
#module_start_command c:\windows\system32\taskmgr.exe
#module_end
# Example of watchdog service opening it if it gets closed
#module_begin
#module_name ServiceVNC_Server
#module_type generic_proc
#module_service winvnc
#module_description Service VNC Server watchdog/service
#module_async yes
#module_watchdog yes
#module_end
# Example UDP server to be able to execute remote actions such
# as starting or stopping process.
#udp_server 1
#udp_server_port 4321
#udp_server_auth_address 192.168.1.23
#process_firefox_start firefox
#process_firefox_stop killall firefox
#service_messenger 1
# Example of preconditions
#module_begin
#module_name Test Precondicion
#module_type generic_data
#module_precondition < 10 cmd.exe /c echo 5
#module_precondition > 10 cmd.exe /c echo 15
#module_precondition = 10 cmd.exe /c echo 10
#module_precondition != 10 cmd.exe /c echo 5
#module_precondition =~ 10 cmd.exe /c echo 10
#module_precondition (5,15) cmd.exe /c echo 10
#module_freepercentmemory
#module_description Precondition test module
#module_end
# Example of postconditions
#module_begin
#module_name Test Postcondicion
#module_type generic_data
#module_condition < 10 cmd.exe /c echo min >> c:\log.txt
#module_condition > 3 cmd.exe /c echo max >> c:\log.txt
#module_condition = 5 cmd.exe /c echo equal >> c:\log.txt
#module_condition != 10 cmd.exe /c echo diff >> c:\log.txt
#module_condition =~ 5 cmd.exe /c echo regexp >> c:\log.txt
#module_condition (3,8) cmd.exe /c echo range >> c:\log.txt
#module_exec echo 5
#module_description Postcondition test module
#module_end

View File

@ -0,0 +1 @@
AT|grep restart_pandora_agent|gawk "{print \"@AT \"$1\" /DELETE\"}" > DEL-AT.BAT & @DEL-AT.BAT & DEL DEL-AT.BAT

View File

@ -0,0 +1,2 @@
@at 00:00 /every:1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30 "%CD%\restart_pandora_agent.bat"

View File

@ -0,0 +1,2 @@
@net stop PandoraFMSAgent
@net start PandoraFMSAgent

View File

@ -0,0 +1 @@
@net start pandoraFMSagent

View File

@ -0,0 +1 @@
@net stop pandoraFMSagent

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,33 @@
' df.vbs
' Returns free space for avaible drives.
' --------------------------------------
Option Explicit
On Error Resume Next
' Variables
Dim objWMIService, objItem, colItems, argc, argv, i
' Parse command line parameters
argc = Wscript.Arguments.Count
Set argv = CreateObject("Scripting.Dictionary")
For i = 0 To argc - 1
argv.Add Wscript.Arguments(i), i
Next
' Get drive information
Set objWMIService = GetObject ("winmgmts:\\.\root\cimv2")
Set colItems = objWMIService.ExecQuery ("Select * from Win32_LogicalDisk")
For Each objItem in colItems
If argc = 0 Or argv.Exists(objItem.Name) Then
If objItem.FreeSpace <> "" Then
Wscript.StdOut.WriteLine "<module>"
Wscript.StdOut.WriteLine " <name><![CDATA[" & objItem.Name & "]]></name>"
Wscript.StdOut.WriteLine " <description><![CDATA[Drive " & objItem.Name & " free space in MB]]></description>"
Wscript.StdOut.WriteLine " <data><![CDATA[" & Int(objItem.FreeSpace /1048576) & "]]></data>"
Wscript.StdOut.WriteLine "</module>"
Wscript.StdOut.flush
End If
End If
Next

View File

@ -0,0 +1,38 @@
' df_all.vbs
' Returns free space (%) for all drives
' Pandora FMS Plugin, (c) 2010 Sancho Lerena
' ------------------------------------------
Option Explicit
On Error Resume Next
' Variables
Dim objWMIService, objItem, colItems, argc, argv, i, Percent
' Parse command line parameters
argc = Wscript.Arguments.Count
Set argv = CreateObject("Scripting.Dictionary")
For i = 0 To argc - 1
argv.Add Wscript.Arguments(i), i
Next
' Get drive information
Set objWMIService = GetObject ("winmgmts:\\.\root\cimv2")
Set colItems = objWMIService.ExecQuery ("Select * from Win32_LogicalDisk")
For Each objItem in colItems
If argc = 0 Or argv.Exists(objItem.Name) Then
' Include only harddrivers (type 3)
If (objItem.FreeSpace <> "") AND (objItem.DriveType =3) Then
Percent = round ((objItem.FreeSpace / objItem.Size) * 100, 2)
Wscript.StdOut.WriteLine "<module>"
Wscript.StdOut.WriteLine " <name><![CDATA[DiskFree%_" & objItem.Name & "]]></name>"
Wscript.StdOut.WriteLine " <description><![CDATA[Drive " & objItem.Name & " % free space ]]></description>"
Wscript.StdOut.WriteLine " <data><![CDATA[" & Percent & "]]></data>"
Wscript.StdOut.WriteLine "</module>"
Wscript.StdOut.flush
End If
End If
Next

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,14 @@
@echo off
if "%1" == "" GOTO HELP
"%ProgramFiles%\pandora_agent\util\snmpget" -M "%ProgramFiles%\pandora_agent\util\mibs" -Oveqtu -v 1 -c %1 %2 %3
goto EXIT0
:HELP
echo I need parameters.
echo getsnmp.bat community ip_address OID
goto EXIT0
:EXIT0

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,93 @@
' --------------------------------------------------------------
' WMI Log Event Parser for Windows
' Used as Plugin in Pandora FMS Monitoring System
' Written by Sancho Lerena <slerena@gmail.com> 2010
' Licensed under BSD Licence
' --------------------------------------------------------------
' This plugin uses three parameters:
'
' module_name : Module name to be reported at pandora, p.e: Event_Application
' logfile : Windows event logfile: Application, System, Security...
' interval: Should be the same interval agent has, p.e: 300 (seconds)
' Code begins here
' Take args from command line
if (Wscript.Arguments.Count = 0) then
WScript.Quit
end if
On Error Resume Next
cfg_module_name = Wscript.Arguments(0)
cfg_logfile = Wscript.Arguments(1)
cfg_interval = Wscript.Arguments(2)
strComputer = "."
MyDate = dateAdd("s", -cfg_interval, Now) ' Latest X seconds
Set dtmStartDate = CreateObject("WbemScripting.SWbemDateTime")
CONVERT_TO_LOCAL_TIME = TRUE
DateToCheck = CDate(MyDate)
dtmStartDate.SetVarDate DateToCheck, CONVERT_TO_LOCAL_TIME
WMI_QUERY = "Select * from Win32_NTLogEvent Where Logfile = '" & cfg_logfile & "' AND TimeWritten >= '" & dtmStartDate & "'"
' DEBUG
'wscript.StdOut.WriteLine dtmStartDate
'wscript.StdOut.WriteLine WMI_QUERY
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colEvents = objWMIService.ExecQuery (WMI_QUERY)
'The XML files need the have the fields SEVERITY, MESSAGE and
'STACKTRACE. These are the fields that are often used when logging with
'log4j. Just in case, the severity field can have the following values:
'TRACE, DEBUG, INFO, WARN, ERROR, FATAL. The "message" field is just
For Each objEvent in colEvents
if (objEvent.Type = "0") then
severity = "FATAL"
end if
if (objEvent.Type = "1") then
severity = "ERROR"
end if
if (objEvent.Type = "2") then
severity = "WARN"
end if
if (objEvent.Type >= "3") then
severity = "INFO"
end if
stacktrace = "Category: " & objEvent.CategoryString & ", Event Code: " & objEvent.EventCode & ", Source Name: " & objEvent.SourceName & ", LogFile: " & cfg_logfile
event_message = objEvent.Message
Wscript.StdOut.Write "<module>"
Wscript.StdOut.Write "<name><![CDATA[" & cfg_module_name & "]]></name>"
Wscript.StdOut.Write "<type>log4x</type>"
Wscript.StdOut.Write "<severity>" & severity & "</severity>"
if (event_message = "") then
Wscript.StdOut.Write "<message></message>"
else
Wscript.StdOut.Write "<message><![CDATA[" & event_message & "]]></message>"
end if
if (stacktrace = "") then
Wscript.StdOut.Write "<stacktrace></stacktrace>"
else
Wscript.StdOut.Write "<stacktrace><![CDATA[" & stacktrace & "]]></stacktrace>"
end if
Wscript.StdOut.WriteLine "</module>"
Wscript.StdOut.flush
Next
' Code ends here

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,68 @@
AGENTX-MIB AGENTX-MIB.txt
DISMAN-EVENT-MIB DISMAN-EVENT-MIB.txt
DISMAN-EXPRESSION-MIB DISMAN-EXPRESSION-MIB.txt
DISMAN-NSLOOKUP-MIB DISMAN-NSLOOKUP-MIB.txt
DISMAN-PING-MIB DISMAN-PING-MIB.txt
DISMAN-SCHEDULE-MIB DISMAN-SCHEDULE-MIB.txt
DISMAN-SCRIPT-MIB DISMAN-SCRIPT-MIB.txt
DISMAN-TRACEROUTE-MIB DISMAN-TRACEROUTE-MIB.txt
EtherLike-MIB EtherLike-MIB.txt
HCNUM-TC HCNUM-TC.txt
HOST-RESOURCES-MIB HOST-RESOURCES-MIB.txt
HOST-RESOURCES-TYPES HOST-RESOURCES-TYPES.txt
IANA-ADDRESS-FAMILY-NUMBERS-MIB IANA-ADDRESS-FAMILY-NUMBERS-MIB.txt
IANA-LANGUAGE-MIB IANA-LANGUAGE-MIB.txt
IANA-RTPROTO-MIB IANA-RTPROTO-MIB.txt
IANAifType-MIB IANAifType-MIB.txt
IF-INVERTED-STACK-MIB IF-INVERTED-STACK-MIB.txt
IF-MIB IF-MIB.txt
INET-ADDRESS-MIB INET-ADDRESS-MIB.txt
IP-FORWARD-MIB IP-FORWARD-MIB.txt
IP-MIB IP-MIB.txt
IPV6-ICMP-MIB IPV6-ICMP-MIB.txt
IPV6-MIB IPV6-MIB.txt
IPV6-TC IPV6-TC.txt
IPV6-TCP-MIB IPV6-TCP-MIB.txt
IPV6-UDP-MIB IPV6-UDP-MIB.txt
LM-SENSORS-MIB LM-SENSORS-MIB.txt
MTA-MIB MTA-MIB.txt
NET-SNMP-AGENT-MIB NET-SNMP-AGENT-MIB.txt
NET-SNMP-EXAMPLES-MIB NET-SNMP-EXAMPLES-MIB.txt
NET-SNMP-EXTEND-MIB NET-SNMP-EXTEND-MIB.txt
NET-SNMP-MIB NET-SNMP-MIB.txt
NET-SNMP-MONITOR-MIB NET-SNMP-MONITOR-MIB.txt
NET-SNMP-SYSTEM-MIB NET-SNMP-SYSTEM-MIB.txt
NET-SNMP-TC NET-SNMP-TC.txt
NETWORK-SERVICES-MIB NETWORK-SERVICES-MIB.txt
NOTIFICATION-LOG-MIB NOTIFICATION-LOG-MIB.txt
RFC-1215 RFC-1215.txt
RFC1155-SMI RFC1155-SMI.txt
RFC1213-MIB RFC1213-MIB.txt
RMON-MIB RMON-MIB.txt
SMUX-MIB SMUX-MIB.txt
SNMP-COMMUNITY-MIB SNMP-COMMUNITY-MIB.txt
SNMP-FRAMEWORK-MIB SNMP-FRAMEWORK-MIB.txt
SNMP-MPD-MIB SNMP-MPD-MIB.txt
SNMP-NOTIFICATION-MIB SNMP-NOTIFICATION-MIB.txt
SNMP-PROXY-MIB SNMP-PROXY-MIB.txt
SNMP-TARGET-MIB SNMP-TARGET-MIB.txt
SNMP-USER-BASED-SM-MIB SNMP-USER-BASED-SM-MIB.txt
SNMP-USM-AES-MIB SNMP-USM-AES-MIB.txt
SNMP-USM-DH-OBJECTS-MIB SNMP-USM-DH-OBJECTS-MIB.txt
SNMP-VIEW-BASED-ACM-MIB SNMP-VIEW-BASED-ACM-MIB.txt
SNMPv2-CONF SNMPv2-CONF.txt
SNMPv2-MIB SNMPv2-MIB.txt
SNMPv2-SMI SNMPv2-SMI.txt
SNMPv2-TC SNMPv2-TC.txt
SNMPv2-TM SNMPv2-TM.txt
TCP-MIB TCP-MIB.txt
TRANSPORT-ADDRESS-MIB TRANSPORT-ADDRESS-MIB.txt
TUNNEL-MIB TUNNEL-MIB.txt
UCD-DEMO-MIB UCD-DEMO-MIB.txt
UCD-DISKIO-MIB UCD-DISKIO-MIB.txt
UCD-DLMOD-MIB UCD-DLMOD-MIB.txt
UCD-IPFILTER-MIB UCD-IPFILTER-MIB.txt
UCD-IPFWACC-MIB UCD-IPFWACC-MIB.txt
UCD-SNMP-MIB-OLD UCD-SNMP-MIB-OLD.txt
UCD-SNMP-MIB UCD-SNMP-MIB.txt
UDP-MIB UDP-MIB.txt

View File

@ -0,0 +1,527 @@
AGENTX-MIB DEFINITIONS ::= BEGIN
IMPORTS
MODULE-IDENTITY, OBJECT-TYPE, Unsigned32, mib-2
FROM SNMPv2-SMI
SnmpAdminString
FROM SNMP-FRAMEWORK-MIB
MODULE-COMPLIANCE, OBJECT-GROUP
FROM SNMPv2-CONF
TEXTUAL-CONVENTION, TimeStamp, TruthValue, TDomain
FROM SNMPv2-TC;
agentxMIB MODULE-IDENTITY
LAST-UPDATED "200001100000Z" -- Midnight 10 January 2000
ORGANIZATION "AgentX Working Group"
CONTACT-INFO "WG-email: agentx@dorothy.bmc.com
Subscribe: agentx-request@dorothy.bmc.com
WG-email Archive: ftp://ftp.peer.com/pub/agentx/archives
FTP repository: ftp://ftp.peer.com/pub/agentx
http://www.ietf.org/html.charters/agentx-charter.html
Chair: Bob Natale
ACE*COMM Corporation
Email: bnatale@acecomm.com
WG editor: Mark Ellison
Ellison Software Consulting, Inc.
Email: ellison@world.std.com
Co-author: Lauren Heintz
Cisco Systems,
EMail: lheintz@cisco.com
Co-author: Smitha Gudur
Independent Consultant
Email: sgudur@hotmail.com
"
DESCRIPTION "This is the MIB module for the SNMP Agent Extensibility
Protocol (AgentX). This MIB module will be implemented by
the master agent.
"
REVISION "200001100000Z" -- Midnight 10 January 2000
DESCRIPTION
"Initial version published as RFC 2742."
::= { mib-2 74 }
-- Textual Conventions
AgentxTAddress ::= TEXTUAL-CONVENTION
STATUS current
DESCRIPTION
"Denotes a transport service address. This is identical to
the TAddress textual convention (SNMPv2-SMI) except that
zero-length values are permitted.
"
SYNTAX OCTET STRING (SIZE (0..255))
-- Administrative assignments
agentxObjects OBJECT IDENTIFIER ::= { agentxMIB 1 }
agentxGeneral OBJECT IDENTIFIER ::= { agentxObjects 1 }
agentxConnection OBJECT IDENTIFIER ::= { agentxObjects 2 }
agentxSession OBJECT IDENTIFIER ::= { agentxObjects 3 }
agentxRegistration OBJECT IDENTIFIER ::= { agentxObjects 4 }
agentxDefaultTimeout OBJECT-TYPE
SYNTAX INTEGER (0..255)
UNITS "seconds"
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The default length of time, in seconds, that the master
agent should allow to elapse after dispatching a message
to a session before it regards the subagent as not
responding. This is a system-wide value that may
override the timeout value associated with a particular
session (agentxSessionTimeout) or a particular registered
MIB region (agentxRegTimeout). If the associated value of
agentxSessionTimeout and agentxRegTimeout are zero, or
impractical in accordance with implementation-specific
procedure of the master agent, the value represented by
this object will be the effective timeout value for the
master agent to await a response to a dispatch from a
given subagent.
"
DEFVAL { 5 }
::= { agentxGeneral 1 }
agentxMasterAgentXVer OBJECT-TYPE
SYNTAX INTEGER (1..255)
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The AgentX protocol version supported by this master agent.
The current protocol version is 1. Note that the master agent
must also allow interaction with earlier version subagents.
"
::= { agentxGeneral 2 }
-- The AgentX Subagent Connection Group
agentxConnTableLastChange OBJECT-TYPE
SYNTAX TimeStamp
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The value of sysUpTime when the last row creation or deletion
occurred in the agentxConnectionTable.
"
::= { agentxConnection 1 }
agentxConnectionTable OBJECT-TYPE
SYNTAX SEQUENCE OF AgentxConnectionEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"The agentxConnectionTable tracks all current AgentX transport
connections. There may be zero, one, or more AgentX sessions
carried on a given AgentX connection.
"
::= { agentxConnection 2 }
agentxConnectionEntry OBJECT-TYPE
SYNTAX AgentxConnectionEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"An agentxConnectionEntry contains information describing a
single AgentX transport connection. A connection may be
used to support zero or more AgentX sessions. An entry is
created when a new transport connection is established,
and is destroyed when the transport connection is terminated.
"
INDEX { agentxConnIndex }
::= { agentxConnectionTable 1 }
AgentxConnectionEntry ::= SEQUENCE {
agentxConnIndex Unsigned32,
agentxConnOpenTime TimeStamp,
agentxConnTransportDomain TDomain,
agentxConnTransportAddress AgentxTAddress }
agentxConnIndex OBJECT-TYPE
SYNTAX Unsigned32 (1..4294967295)
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"agentxConnIndex contains the value that uniquely identifies
an open transport connection used by this master agent
to provide AgentX service. Values of this index should
not be re-used. The value assigned to a given transport
connection is constant for the lifetime of that connection.
"
::= { agentxConnectionEntry 1 }
agentxConnOpenTime OBJECT-TYPE
SYNTAX TimeStamp
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The value of sysUpTime when this connection was established
and, therefore, its value when this entry was added to the table.
"
::= { agentxConnectionEntry 2 }
agentxConnTransportDomain OBJECT-TYPE
SYNTAX TDomain
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The transport protocol in use for this connection to the
subagent.
"
::= { agentxConnectionEntry 3 }
agentxConnTransportAddress OBJECT-TYPE
SYNTAX AgentxTAddress
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The transport address of the remote (subagent) end of this
connection to the master agent. This object may be zero-length
for unix-domain sockets (and possibly other types of transport
addresses) since the subagent need not bind a filename to its
local socket.
"
::= { agentxConnectionEntry 4 }
-- The AgentX Subagent Session Group
agentxSessionTableLastChange OBJECT-TYPE
SYNTAX TimeStamp
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The value of sysUpTime when the last row creation or deletion
occurred in the agentxSessionTable.
"
::= { agentxSession 1 }
agentxSessionTable OBJECT-TYPE
SYNTAX SEQUENCE OF AgentxSessionEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"A table of AgentX subagent sessions currently in effect.
"
::= { agentxSession 2 }
agentxSessionEntry OBJECT-TYPE
SYNTAX AgentxSessionEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"Information about a single open session between the AgentX
master agent and a subagent is contained in this entry. An
entry is created when a new session is successfully established
and is destroyed either when the subagent transport connection
has terminated or when the subagent session is closed.
"
INDEX { agentxConnIndex, agentxSessionIndex }
::= { agentxSessionTable 1 }
AgentxSessionEntry ::= SEQUENCE {
agentxSessionIndex Unsigned32,
agentxSessionObjectID OBJECT IDENTIFIER,
agentxSessionDescr SnmpAdminString,
agentxSessionAdminStatus INTEGER,
agentxSessionOpenTime TimeStamp,
agentxSessionAgentXVer INTEGER,
agentxSessionTimeout INTEGER
}
agentxSessionIndex OBJECT-TYPE
SYNTAX Unsigned32 (0..4294967295)
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"A unique index for the subagent session. It is the same as
h.sessionID defined in the agentx header. Note that if
a subagent's session with the master agent is closed for
any reason its index should not be re-used.
A value of zero(0) is specifically allowed in order
to be compatible with the definition of h.sessionId.
"
::= { agentxSessionEntry 1 }
agentxSessionObjectID OBJECT-TYPE
SYNTAX OBJECT IDENTIFIER
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"This is taken from the o.id field of the agentx-Open-PDU.
This attribute will report a value of '0.0' for subagents
not supporting the notion of an AgentX session object
identifier.
"
::= { agentxSessionEntry 2 }
agentxSessionDescr OBJECT-TYPE
SYNTAX SnmpAdminString
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"A textual description of the session. This is analogous to
sysDescr defined in the SNMPv2-MIB in RFC 1907 [19] and is
taken from the o.descr field of the agentx-Open-PDU.
This attribute will report a zero-length string value for
subagents not supporting the notion of a session description.
"
::= { agentxSessionEntry 3 }
agentxSessionAdminStatus OBJECT-TYPE
SYNTAX INTEGER {
up(1),
down(2)
}
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"The administrative (desired) status of the session. Setting
the value to 'down(2)' closes the subagent session (with c.reason
set to 'reasonByManager').
"
::= { agentxSessionEntry 4 }
agentxSessionOpenTime OBJECT-TYPE
SYNTAX TimeStamp
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The value of sysUpTime when this session was opened and,
therefore, its value when this entry was added to the table.
"
::= { agentxSessionEntry 5 }
agentxSessionAgentXVer OBJECT-TYPE
SYNTAX INTEGER (1..255)
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The version of the AgentX protocol supported by the
session. This must be less than or equal to the value of
agentxMasterAgentXVer.
"
::= { agentxSessionEntry 6 }
agentxSessionTimeout OBJECT-TYPE
SYNTAX INTEGER (0..255)
UNITS "seconds"
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The length of time, in seconds, that a master agent should
allow to elapse after dispatching a message to this session
before it regards the subagent as not responding. This value
is taken from the o.timeout field of the agentx-Open-PDU.
This is a session-specific value that may be overridden by
values associated with the specific registered MIB regions
(see agentxRegTimeout). A value of zero(0) indicates that
the master agent's default timeout value should be used
(see agentxDefaultTimeout).
"
::= { agentxSessionEntry 7 }
-- The AgentX Registration Group
agentxRegistrationTableLastChange OBJECT-TYPE
SYNTAX TimeStamp
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The value of sysUpTime when the last row creation or deletion
occurred in the agentxRegistrationTable.
"
::= { agentxRegistration 1 }
agentxRegistrationTable OBJECT-TYPE
SYNTAX SEQUENCE OF AgentxRegistrationEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"A table of registered regions.
"
::= { agentxRegistration 2 }
agentxRegistrationEntry OBJECT-TYPE
SYNTAX AgentxRegistrationEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"Contains information for a single registered region. An
entry is created when a session successfully registers a
region and is destroyed for any of three reasons: this region
is unregistered by the session, the session is closed,
or the subagent connection is closed.
"
INDEX { agentxConnIndex, agentxSessionIndex, agentxRegIndex }
::= { agentxRegistrationTable 1 }
AgentxRegistrationEntry ::= SEQUENCE {
agentxRegIndex Unsigned32,
agentxRegContext OCTET STRING,
agentxRegStart OBJECT IDENTIFIER,
agentxRegRangeSubId Unsigned32,
agentxRegUpperBound Unsigned32,
agentxRegPriority Unsigned32,
agentxRegTimeout INTEGER,
agentxRegInstance TruthValue }
agentxRegIndex OBJECT-TYPE
SYNTAX Unsigned32 (1..4294967295)
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"agentxRegIndex uniquely identifies a registration entry.
This value is constant for the lifetime of an entry.
"
::= { agentxRegistrationEntry 1 }
agentxRegContext OBJECT-TYPE
SYNTAX OCTET STRING
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The context in which the session supports the objects in this
region. A zero-length context indicates the default context.
"
::= { agentxRegistrationEntry 2 }
agentxRegStart OBJECT-TYPE
SYNTAX OBJECT IDENTIFIER
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The starting OBJECT IDENTIFIER of this registration entry. The
session identified by agentxSessionIndex implements objects
starting at this value (inclusive). Note that this value could
identify an object type, an object instance, or a partial object
instance.
"
::= { agentxRegistrationEntry 3 }
agentxRegRangeSubId OBJECT-TYPE
SYNTAX Unsigned32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"agentxRegRangeSubId is used to specify the range. This is
taken from r.region_subid in the registration PDU. If the value
of this object is zero, no range is specified. If it is non-zero,
it identifies the `nth' sub-identifier in r.region for which
this entry's agentxRegUpperBound value is substituted in the
OID for purposes of defining the region's upper bound.
"
::= { agentxRegistrationEntry 4 }
agentxRegUpperBound OBJECT-TYPE
SYNTAX Unsigned32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"agentxRegUpperBound represents the upper-bound sub-identifier in
a registration. This is taken from the r.upper_bound in the
registration PDU. If agentxRegRangeSubid (r.region_subid) is
zero, this value is also zero and is not used to define an upper
bound for this registration.
"
::= { agentxRegistrationEntry 5 }
agentxRegPriority OBJECT-TYPE
SYNTAX Unsigned32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The registration priority. Lower values have higher priority.
This value is taken from r.priority in the register PDU.
Sessions should use the value of 127 for r.priority if a
default value is desired.
"
::= { agentxRegistrationEntry 6 }
agentxRegTimeout OBJECT-TYPE
SYNTAX INTEGER (0..255)
UNITS "seconds"
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The timeout value, in seconds, for responses to
requests associated with this registered MIB region.
A value of zero(0) indicates the default value (indicated
by by agentxSessionTimeout or agentxDefaultTimeout) is to
be used. This value is taken from the r.timeout field of
the agentx-Register-PDU.
"
::= { agentxRegistrationEntry 7 }
agentxRegInstance OBJECT-TYPE
SYNTAX TruthValue
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The value of agentxRegInstance is `true' for
registrations for which the INSTANCE_REGISTRATION
was set, and is `false' for all other registrations.
"
::= { agentxRegistrationEntry 8 }
-- Conformance Statements for AgentX
agentxConformance OBJECT IDENTIFIER ::= { agentxMIB 2 }
agentxMIBGroups OBJECT IDENTIFIER ::= { agentxConformance 1 }
agentxMIBCompliances OBJECT IDENTIFIER ::= { agentxConformance 2 }
-- Compliance Statements for AgentX
agentxMIBCompliance MODULE-COMPLIANCE
STATUS current
DESCRIPTION
"The compliance statement for SNMP entities that implement the
AgentX protocol. Note that a compliant agent can implement all
objects in this MIB module as read-only.
"
MODULE -- this module
MANDATORY-GROUPS { agentxMIBGroup }
OBJECT agentxSessionAdminStatus
MIN-ACCESS read-only
DESCRIPTION
"Write access is not required.
"
::= { agentxMIBCompliances 1 }
agentxMIBGroup OBJECT-GROUP
OBJECTS {
agentxDefaultTimeout,
agentxMasterAgentXVer,
agentxConnTableLastChange,
agentxConnOpenTime,
agentxConnTransportDomain,
agentxConnTransportAddress,
agentxSessionTableLastChange,
agentxSessionTimeout,
agentxSessionObjectID,
agentxSessionDescr,
agentxSessionAdminStatus,
agentxSessionOpenTime,
agentxSessionAgentXVer,
agentxRegistrationTableLastChange,
agentxRegContext,
agentxRegStart,
agentxRegRangeSubId,
agentxRegUpperBound,
agentxRegPriority,
agentxRegTimeout,
agentxRegInstance
}
STATUS current
DESCRIPTION
"All accessible objects in the AgentX MIB.
"
::= { agentxMIBGroups 1 }
END

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,509 @@
DISMAN-NSLOOKUP-MIB DEFINITIONS ::= BEGIN
IMPORTS
MODULE-IDENTITY, OBJECT-TYPE,
Unsigned32, mib-2, Integer32
FROM SNMPv2-SMI -- RFC2578
RowStatus
FROM SNMPv2-TC -- RFC2579
MODULE-COMPLIANCE, OBJECT-GROUP
FROM SNMPv2-CONF -- RFC2580
SnmpAdminString
FROM SNMP-FRAMEWORK-MIB -- RFC3411
InetAddressType, InetAddress
FROM INET-ADDRESS-MIB; -- RFC4001
lookupMIB MODULE-IDENTITY
LAST-UPDATED "200606130000Z" -- 13 June 2006
ORGANIZATION "IETF Distributed Management Working Group"
CONTACT-INFO
"Juergen Quittek
NEC Europe Ltd.
Network Laboratories
Kurfuersten-Anlage 36
69115 Heidelberg
Germany
Phone: +49 6221 4342-115
Email: quittek@netlab.nec.de"
DESCRIPTION
"The Lookup MIB (DISMAN-NSLOOKUP-MIB) enables determination
of either the name(s) corresponding to a host address or of
the address(es) associated with a host name at a remote
host.
Copyright (C) The Internet Society (2006). This version of
this MIB module is part of RFC 4560; see the RFC itself for
full legal notices."
-- Revision history
REVISION "200606130000Z" -- 13 June 2006
DESCRIPTION
"Updated version, published as RFC 4560.
- Replaced references to RFC 2575 by RFC 3415
- Replaced references to RFC 2571 by RFC 3411
- Replaced references to RFC 2851 by RFC 4001
- Added value enabled(1) to SYNTAX clause of
lookupCtlOperStatus
- Added lookupMinimumCompliance
- Defined semantics of value 0 for object
lookupPurgeTime
- Added DEFVAL { unknown } to object
lookupCtlTargetAddressType OBJECT-TYPE"
REVISION "200009210000Z" -- 21 September 2000
DESCRIPTION
"Initial version, published as RFC 2925."
::= { mib-2 82 }
-- Top level structure of the MIB
lookupObjects OBJECT IDENTIFIER ::= { lookupMIB 1 }
lookupConformance OBJECT IDENTIFIER ::= { lookupMIB 2 }
-- Simple Object Definitions
lookupMaxConcurrentRequests OBJECT-TYPE
SYNTAX Unsigned32
UNITS "requests"
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"The maximum number of concurrent active lookup requests
that are allowed within an agent implementation. A value
of 0 for this object implies that there is no limit for
the number of concurrent active requests in effect.
The limit applies only to new requests being activated.
When a new value is set, the agent will continue processing
all the requests already active, even if their number
exceed the limit just imposed."
DEFVAL { 10 }
::= { lookupObjects 1 }
lookupPurgeTime OBJECT-TYPE
SYNTAX Unsigned32 (0..86400)
UNITS "seconds"
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"The amount of time to wait before automatically
deleting an entry in the lookupCtlTable and any
dependent lookupResultsTable entries
after the lookup operation represented by a
lookupCtlEntry has been completed.
A lookupCtEntry is considered complete
when its lookupCtlOperStatus object has a
value of completed(3).
A value of 0 indicates that automatic deletion
of entries is disabled."
DEFVAL { 900 } -- 15 minutes as default
::= { lookupObjects 2 }
-- Lookup Control Table
lookupCtlTable OBJECT-TYPE
SYNTAX SEQUENCE OF LookupCtlEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"Defines the Lookup Control Table for providing
the capability of performing a lookup operation
for a symbolic host name or for a host address
from a remote host."
::= { lookupObjects 3 }
lookupCtlEntry OBJECT-TYPE
SYNTAX LookupCtlEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"Defines an entry in the lookupCtlTable. A
lookupCtlEntry is initially indexed by
lookupCtlOwnerIndex, which is a type of SnmpAdminString,
a textual convention that allows for the use of the SNMPv3
View-Based Access Control Model (RFC 3415, VACM)
and that also allows a management application to identify
its entries. The second index element,
lookupCtlOperationName, enables the same
lookupCtlOwnerIndex entity to have multiple outstanding
requests. The value of lookupCtlTargetAddressType
determines which lookup function to perform."
INDEX {
lookupCtlOwnerIndex,
lookupCtlOperationName
}
::= { lookupCtlTable 1 }
LookupCtlEntry ::=
SEQUENCE {
lookupCtlOwnerIndex SnmpAdminString,
lookupCtlOperationName SnmpAdminString,
lookupCtlTargetAddressType InetAddressType,
lookupCtlTargetAddress InetAddress,
lookupCtlOperStatus INTEGER,
lookupCtlTime Unsigned32,
lookupCtlRc Integer32,
lookupCtlRowStatus RowStatus
}
lookupCtlOwnerIndex OBJECT-TYPE
SYNTAX SnmpAdminString (SIZE(0..32))
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"To facilitate the provisioning of access control by a
security administrator using the View-Based Access
Control Model (RFC 2575, VACM) for tables in which
multiple users may need to create or
modify entries independently, the initial index is used as
an 'owner index'. Such an initial index has a syntax of
SnmpAdminString and can thus be trivially mapped to a
securityName or groupName defined in VACM, in
accordance with a security policy.
When used in conjunction with such a security policy all
entries in the table belonging to a particular user (or
group) will have the same value for this initial index.
For a given user's entries in a particular table, the
object identifiers for the information in these entries
will have the same subidentifiers (except for the
'column' subidentifier) up to the end of the encoded
owner index. To configure VACM to permit access to this
portion of the table, one would create
vacmViewTreeFamilyTable entries with the value of
vacmViewTreeFamilySubtree including the owner index
portion, and vacmViewTreeFamilyMask 'wildcarding' the
column subidentifier. More elaborate configurations
are possible."
::= { lookupCtlEntry 1 }
lookupCtlOperationName OBJECT-TYPE
SYNTAX SnmpAdminString (SIZE(0..32))
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"The name of a lookup operation. This is locally unique,
within the scope of an lookupCtlOwnerIndex."
::= { lookupCtlEntry 2 }
lookupCtlTargetAddressType OBJECT-TYPE
SYNTAX InetAddressType
MAX-ACCESS read-create
STATUS current
DESCRIPTION
"Specifies the type of address for performing a
lookup operation for a symbolic host name or for a host
address from a remote host.
Specification of dns(16) as the value for this object
means that a function such as, for example, getaddrinfo()
or gethostbyname() should be performed to return one or
more numeric addresses. Use of a value of either ipv4(1)
or ipv6(2) means that a functions such as, for example,
getnameinfo() or gethostbyaddr() should be used to return
the symbolic names associated with a host."
DEFVAL { unknown }
::= { lookupCtlEntry 3 }
lookupCtlTargetAddress OBJECT-TYPE
SYNTAX InetAddress
MAX-ACCESS read-create
STATUS current
DESCRIPTION
"Specifies the address used for a resolver lookup at a
remote host. The corresponding lookupCtlTargetAddressType
objects determines its type, as well as the function
that can be requested.
A value for this object MUST be set prior to
transitioning its corresponding lookupCtlEntry to
active(1) via lookupCtlRowStatus."
::= { lookupCtlEntry 4 }
lookupCtlOperStatus OBJECT-TYPE
SYNTAX INTEGER {
enabled(1), -- operation is active
notStarted(2), -- operation has not started
completed(3) -- operation is done
}
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Reflects the operational state of an lookupCtlEntry:
enabled(1) - Operation is active.
notStarted(2) - Operation has not been enabled.
completed(3) - Operation has been completed.
An operation is automatically enabled(1) when its
lookupCtlRowStatus object is transitioned to active(1)
status. Until this occurs, lookupCtlOperStatus MUST
report a value of notStarted(2). After the lookup
operation is completed (success or failure), the value
for lookupCtlOperStatus MUST be transitioned to
completed(3)."
::= { lookupCtlEntry 5 }
lookupCtlTime OBJECT-TYPE
SYNTAX Unsigned32
UNITS "milliseconds"
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Reports the number of milliseconds that a lookup
operation required to be completed at a remote host.
Completed means operation failure as well as
success."
::= { lookupCtlEntry 6 }
lookupCtlRc OBJECT-TYPE
SYNTAX Integer32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The system-specific return code from a lookup
operation. All implementations MUST return a value
of 0 for this object when the remote lookup
operation succeeds. A non-zero value for this
objects indicates failure. It is recommended that
implementations return the error codes that are
generated by the lookup function used."
::= { lookupCtlEntry 7 }
lookupCtlRowStatus OBJECT-TYPE
SYNTAX RowStatus
MAX-ACCESS read-create
STATUS current
DESCRIPTION
"This object allows entries to be created and deleted
in the lookupCtlTable.
A remote lookup operation is started when an
entry in this table is created via an SNMP set
request and the entry is activated. This
occurs by setting the value of this object
to CreateAndGo(4) during row creation or
by setting this object to active(1) after
the row is created.
A value MUST be specified for lookupCtlTargetAddress
prior to the acceptance of a transition to active(1) state.
A remote lookup operation starts when its entry
first becomes active(1). Transitions in and
out of active(1) state have no effect on the
operational behavior of a remote lookup
operation, with the exception that deletion of
an entry in this table by setting its RowStatus
object to destroy(6) will stop an active
remote lookup operation.
The operational state of a remote lookup operation
can be determined by examination of its
lookupCtlOperStatus object."
REFERENCE
"See definition of RowStatus in RFC 2579,
'Textual Conventions for SMIv2.'"
::= { lookupCtlEntry 8 }
-- Lookup Results Table
lookupResultsTable OBJECT-TYPE
SYNTAX SEQUENCE OF LookupResultsEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"Defines the Lookup Results Table for providing
the capability of determining the results of a
operation at a remote host.
One or more entries are added to the
lookupResultsTable when a lookup operation,
as reflected by an lookupCtlEntry, is completed
successfully. All entries related to a
successful lookup operation MUST be added
to the lookupResultsTable at the same time
that the associating lookupCtlOperStatus
object is transitioned to completed(2).
The number of entries added depends on the
results determined for a particular lookup
operation. All entries associated with an
lookupCtlEntry are removed when the
lookupCtlEntry is deleted.
A remote host can be multi-homed and have more than one IP
address associated with it (returned by lookup function),
or it can have more than one symbolic name (returned
by lookup function).
A function such as, for example, getnameinfo() or
gethostbyaddr() is called with a host address as its
parameter and is used primarily to determine a symbolic
name to associate with the host address. Entries in the
lookupResultsTable MUST be made for each host name
returned. If the function identifies an 'official host
name,' then this symbolic name MUST be assigned a
lookupResultsIndex of 1.
A function such as, for example, getaddrinfo() or
gethostbyname() is called with a symbolic host name and is
used primarily to retrieve a host address. The entries
MUST be stored in the order that they are retrieved from
the lookup function. lookupResultsIndex 1 MUST be
assigned to the first entry."
::= { lookupObjects 4 }
lookupResultsEntry OBJECT-TYPE
SYNTAX LookupResultsEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"Defines an entry in the lookupResultsTable. The
first two index elements identify the
lookupCtlEntry that a lookupResultsEntry belongs
to. The third index element selects a single
lookup operation result."
INDEX {
lookupCtlOwnerIndex,
lookupCtlOperationName,
lookupResultsIndex
}
::= { lookupResultsTable 1 }
LookupResultsEntry ::=
SEQUENCE {
lookupResultsIndex Unsigned32,
lookupResultsAddressType InetAddressType,
lookupResultsAddress InetAddress
}
lookupResultsIndex OBJECT-TYPE
SYNTAX Unsigned32 (1..'ffffffff'h)
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"Entries in the lookupResultsTable are created when
the result of a lookup operation is determined.
Entries MUST be stored in the lookupResultsTable in
the order that they are retrieved. Values assigned
to lookupResultsIndex MUST start at 1 and increase
consecutively."
::= { lookupResultsEntry 1 }
lookupResultsAddressType OBJECT-TYPE
SYNTAX InetAddressType
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Indicates the type of result of a remote lookup
operation. A value of unknown(0) implies either that
the operation hasn't been started or that
it has failed."
::= { lookupResultsEntry 2 }
lookupResultsAddress OBJECT-TYPE
SYNTAX InetAddress
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Reflects a result for a remote lookup operation
as per the value of lookupResultsAddressType.
The address type (InetAddressType) that relates to
this object is specified by the corresponding value
of lookupResultsAddress."
::= { lookupResultsEntry 3 }
-- Conformance information
-- Compliance statements
lookupCompliances OBJECT IDENTIFIER ::= { lookupConformance 1 }
lookupGroups OBJECT IDENTIFIER ::= { lookupConformance 2 }
-- Compliance statements
lookupCompliance MODULE-COMPLIANCE
STATUS current
DESCRIPTION
"The compliance statement for SNMP entities that
fully implement the DISMAN-NSLOOKUP-MIB."
MODULE -- this module
MANDATORY-GROUPS { lookupGroup }
OBJECT lookupMaxConcurrentRequests
MIN-ACCESS read-only
DESCRIPTION
"The agent is not required to support set
operations to this object."
OBJECT lookupPurgeTime
MIN-ACCESS read-only
DESCRIPTION
"The agent is not required to support a set
operation to this object."
::= { lookupCompliances 1 }
lookupMinimumCompliance MODULE-COMPLIANCE
STATUS current
DESCRIPTION
"The minimum compliance statement for SNMP entities
that implement the minimal subset of the
DISMAN-NSLOOKUP-MIB. Implementors might choose this
subset for small devices with limited resources."
MODULE -- this module
MANDATORY-GROUPS { lookupGroup }
OBJECT lookupMaxConcurrentRequests
MIN-ACCESS read-only
DESCRIPTION
"The agent is not required to support set
operations to this object."
OBJECT lookupPurgeTime
MIN-ACCESS read-only
DESCRIPTION
"The agent is not required to support a set
operation to this object."
OBJECT lookupCtlRowStatus
MIN-ACCESS read-only
DESCRIPTION
"Write access is not required. If write access is
not supported, then at least one entry in the
lookupCtlTable MUST be established already when the SNMP
agent starts offering access to the NSLOOKUP-MIB module.
If, in such a case, only a single entry is offered, then
it is RECOMMENDED that this entry use strings with a
length of 0 for both of its two index objects."
::= { lookupCompliances 2 }
-- MIB groupings
lookupGroup OBJECT-GROUP
OBJECTS {
lookupMaxConcurrentRequests,
lookupPurgeTime,
lookupCtlOperStatus,
lookupCtlTargetAddressType,
lookupCtlTargetAddress,
lookupCtlTime,
lookupCtlRc,
lookupCtlRowStatus,
lookupResultsAddressType,
lookupResultsAddress
}
STATUS current
DESCRIPTION
"The group of objects that constitute the remote
Lookup operation."
::= { lookupGroups 1 }
END

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,699 @@
DISMAN-SCHEDULE-MIB DEFINITIONS ::= BEGIN
IMPORTS
MODULE-IDENTITY, OBJECT-TYPE, NOTIFICATION-TYPE,
Integer32, Unsigned32, Counter32, mib-2, zeroDotZero
FROM SNMPv2-SMI
TEXTUAL-CONVENTION,
DateAndTime, RowStatus, StorageType, VariablePointer
FROM SNMPv2-TC
MODULE-COMPLIANCE, OBJECT-GROUP, NOTIFICATION-GROUP
FROM SNMPv2-CONF
SnmpAdminString
FROM SNMP-FRAMEWORK-MIB;
schedMIB MODULE-IDENTITY
LAST-UPDATED "200201070000Z"
ORGANIZATION "IETF Distributed Management Working Group"
CONTACT-INFO
"WG EMail: disman@dorothy.bmc.com
Subscribe: disman-request@dorothy.bmc.com
Chair: Randy Presuhn
BMC Software, Inc.
Postal: Office 1-3141
2141 North First Street
San Jose, California 95131
USA
EMail: rpresuhn@bmc.com
Phone: +1 408 546-1006
Editor: David B. Levi
Nortel Networks
Postal: 4401 Great America Parkway
Santa Clara, CA 95052-8185
USA
EMail: dlevi@nortelnetworks.com
Phone: +1 865 686 0432
Editor: Juergen Schoenwaelder
TU Braunschweig
Postal: Bueltenweg 74/75
38106 Braunschweig
Germany
EMail: schoenw@ibr.cs.tu-bs.de
Phone: +49 531 391-3283"
DESCRIPTION
"This MIB module defines a MIB which provides mechanisms to
schedule SNMP set operations periodically or at specific
points in time."
REVISION "200201070000Z"
DESCRIPTION
"Revised version, published as RFC 3231.
This revision introduces a new object type called
schedTriggers. Created new conformance and compliance
statements that take care of the new schedTriggers object.
Several clarifications have been added to remove ambiguities
that were discovered and reported by implementors."
REVISION "199811171800Z"
DESCRIPTION
"Initial version, published as RFC 2591."
::= { mib-2 63 }
--
-- The various groups defined within this MIB definition:
--
schedObjects OBJECT IDENTIFIER ::= { schedMIB 1 }
schedNotifications OBJECT IDENTIFIER ::= { schedMIB 2 }
schedConformance OBJECT IDENTIFIER ::= { schedMIB 3 }
--
-- Textual Conventions:
--
SnmpPduErrorStatus ::= TEXTUAL-CONVENTION
STATUS current
DESCRIPTION
"This TC enumerates the SNMPv1 and SNMPv2 PDU error status
codes as defined in RFC 1157 and RFC 1905. It also adds a
pseudo error status code `noResponse' which indicates a
timeout condition."
SYNTAX INTEGER {
noResponse(-1),
noError(0),
tooBig(1),
noSuchName(2),
badValue(3),
readOnly(4),
genErr(5),
noAccess(6),
wrongType(7),
wrongLength(8),
wrongEncoding(9),
wrongValue(10),
noCreation(11),
inconsistentValue(12),
resourceUnavailable(13),
commitFailed(14),
undoFailed(15),
authorizationError(16),
notWritable(17),
inconsistentName(18)
}
--
-- Some scalars which provide information about the local time zone.
--
schedLocalTime OBJECT-TYPE
SYNTAX DateAndTime (SIZE (11))
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The local time used by the scheduler. Schedules which
refer to calendar time will use the local time indicated
by this object. An implementation MUST return all 11 bytes
of the DateAndTime textual-convention so that a manager
may retrieve the offset from GMT time."
::= { schedObjects 1 }
--
-- The schedule table which controls the scheduler.
--
schedTable OBJECT-TYPE
SYNTAX SEQUENCE OF SchedEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"This table defines scheduled actions triggered by
SNMP set operations."
::= { schedObjects 2 }
schedEntry OBJECT-TYPE
SYNTAX SchedEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"An entry describing a particular scheduled action.
Unless noted otherwise, writable objects of this row
can be modified independent of the current value of
schedRowStatus, schedAdminStatus and schedOperStatus.
In particular, it is legal to modify schedInterval
and the objects in the schedCalendarGroup when
schedRowStatus is active and schedAdminStatus and
schedOperStatus are both enabled."
INDEX { schedOwner, schedName }
::= { schedTable 1 }
SchedEntry ::= SEQUENCE {
schedOwner SnmpAdminString,
schedName SnmpAdminString,
schedDescr SnmpAdminString,
schedInterval Unsigned32,
schedWeekDay BITS,
schedMonth BITS,
schedDay BITS,
schedHour BITS,
schedMinute BITS,
schedContextName SnmpAdminString,
schedVariable VariablePointer,
schedValue Integer32,
schedType INTEGER,
schedAdminStatus INTEGER,
schedOperStatus INTEGER,
schedFailures Counter32,
schedLastFailure SnmpPduErrorStatus,
schedLastFailed DateAndTime,
schedStorageType StorageType,
schedRowStatus RowStatus,
schedTriggers Counter32
}
schedOwner OBJECT-TYPE
SYNTAX SnmpAdminString (SIZE(0..32))
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"The owner of this scheduling entry. The exact semantics of
this string are subject to the security policy defined by
the security administrator."
::= { schedEntry 1 }
schedName OBJECT-TYPE
SYNTAX SnmpAdminString (SIZE(1..32))
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"The locally-unique, administratively assigned name for this
scheduling entry. This object allows a schedOwner to have
multiple entries in the schedTable."
::= { schedEntry 2 }
schedDescr OBJECT-TYPE
SYNTAX SnmpAdminString
MAX-ACCESS read-create
STATUS current
DESCRIPTION
"The human readable description of the purpose of this
scheduling entry."
DEFVAL { "" }
::= { schedEntry 3 }
schedInterval OBJECT-TYPE
SYNTAX Unsigned32
UNITS "seconds"
MAX-ACCESS read-create
STATUS current
DESCRIPTION
"The number of seconds between two action invocations of
a periodic scheduler. Implementations must guarantee
that action invocations will not occur before at least
schedInterval seconds have passed.
The scheduler must ignore all periodic schedules that
have a schedInterval value of 0. A periodic schedule
with a scheduling interval of 0 seconds will therefore
never invoke an action.
Implementations may be forced to delay invocations in the
face of local constraints. A scheduled management function
should therefore not rely on the accuracy provided by the
scheduler implementation.
Note that implementations which maintain a list of pending
activations must re-calculate them when this object is
changed."
DEFVAL { 0 }
::= { schedEntry 4 }
schedWeekDay OBJECT-TYPE
SYNTAX BITS {
sunday(0),
monday(1),
tuesday(2),
wednesday(3),
thursday(4),
friday(5),
saturday(6)
}
MAX-ACCESS read-create
STATUS current
DESCRIPTION
"The set of weekdays on which the scheduled action should
take place. Setting multiple bits will include several
weekdays in the set of possible weekdays for this schedule.
Setting all bits will cause the scheduler to ignore the
weekday.
Note that implementations which maintain a list of pending
activations must re-calculate them when this object is
changed."
DEFVAL { {} }
::= { schedEntry 5 }
schedMonth OBJECT-TYPE
SYNTAX BITS {
january(0),
february(1),
march(2),
april(3),
may(4),
june(5),
july(6),
august(7),
september(8),
october(9),
november(10),
december(11)
}
MAX-ACCESS read-create
STATUS current
DESCRIPTION
"The set of months during which the scheduled action should
take place. Setting multiple bits will include several
months in the set of possible months for this schedule.
Setting all bits will cause the scheduler to ignore the
month.
Note that implementations which maintain a list of pending
activations must re-calculate them when this object is
changed."
DEFVAL { {} }
::= { schedEntry 6 }
schedDay OBJECT-TYPE
SYNTAX BITS {
d1(0), d2(1), d3(2), d4(3), d5(4),
d6(5), d7(6), d8(7), d9(8), d10(9),
d11(10), d12(11), d13(12), d14(13), d15(14),
d16(15), d17(16), d18(17), d19(18), d20(19),
d21(20), d22(21), d23(22), d24(23), d25(24),
d26(25), d27(26), d28(27), d29(28), d30(29),
d31(30),
r1(31), r2(32), r3(33), r4(34), r5(35),
r6(36), r7(37), r8(38), r9(39), r10(40),
r11(41), r12(42), r13(43), r14(44), r15(45),
r16(46), r17(47), r18(48), r19(49), r20(50),
r21(51), r22(52), r23(53), r24(54), r25(55),
r26(56), r27(57), r28(58), r29(59), r30(60),
r31(61)
}
MAX-ACCESS read-create
STATUS current
DESCRIPTION
"The set of days in a month on which a scheduled action
should take place. There are two sets of bits one can
use to define the day within a month:
Enumerations starting with the letter 'd' indicate a
day in a month relative to the first day of a month.
The first day of the month can therefore be specified
by setting the bit d1(0) and d31(30) means the last
day of a month with 31 days.
Enumerations starting with the letter 'r' indicate a
day in a month in reverse order, relative to the last
day of a month. The last day in the month can therefore
be specified by setting the bit r1(31) and r31(61) means
the first day of a month with 31 days.
Setting multiple bits will include several days in the set
of possible days for this schedule. Setting all bits will
cause the scheduler to ignore the day within a month.
Setting all bits starting with the letter 'd' or the
letter 'r' will also cause the scheduler to ignore the
day within a month.
Note that implementations which maintain a list of pending
activations must re-calculate them when this object is
changed."
DEFVAL { {} }
::= { schedEntry 7 }
schedHour OBJECT-TYPE
SYNTAX BITS {
h0(0), h1(1), h2(2), h3(3), h4(4),
h5(5), h6(6), h7(7), h8(8), h9(9),
h10(10), h11(11), h12(12), h13(13), h14(14),
h15(15), h16(16), h17(17), h18(18), h19(19),
h20(20), h21(21), h22(22), h23(23)
}
MAX-ACCESS read-create
STATUS current
DESCRIPTION
"The set of hours within a day during which the scheduled
action should take place.
Note that implementations which maintain a list of pending
activations must re-calculate them when this object is
changed."
DEFVAL { {} }
::= { schedEntry 8 }
schedMinute OBJECT-TYPE
SYNTAX BITS {
m0(0), m1(1), m2(2), m3(3), m4(4),
m5(5), m6(6), m7(7), m8(8), m9(9),
m10(10), m11(11), m12(12), m13(13), m14(14),
m15(15), m16(16), m17(17), m18(18), m19(19),
m20(20), m21(21), m22(22), m23(23), m24(24),
m25(25), m26(26), m27(27), m28(28), m29(29),
m30(30), m31(31), m32(32), m33(33), m34(34),
m35(35), m36(36), m37(37), m38(38), m39(39),
m40(40), m41(41), m42(42), m43(43), m44(44),
m45(45), m46(46), m47(47), m48(48), m49(49),
m50(50), m51(51), m52(52), m53(53), m54(54),
m55(55), m56(56), m57(57), m58(58), m59(59)
}
MAX-ACCESS read-create
STATUS current
DESCRIPTION
"The set of minutes within an hour when the scheduled action
should take place.
Note that implementations which maintain a list of pending
activations must re-calculate them when this object is
changed."
DEFVAL { {} }
::= { schedEntry 9 }
schedContextName OBJECT-TYPE
SYNTAX SnmpAdminString (SIZE(0..32))
MAX-ACCESS read-create
STATUS current
DESCRIPTION
"The context which contains the local MIB variable pointed
to by schedVariable."
DEFVAL { "" }
::= { schedEntry 10 }
schedVariable OBJECT-TYPE
SYNTAX VariablePointer
MAX-ACCESS read-create
STATUS current
DESCRIPTION
"An object identifier pointing to a local MIB variable
which resolves to an ASN.1 primitive type of INTEGER."
DEFVAL { zeroDotZero }
::= { schedEntry 11 }
schedValue OBJECT-TYPE
SYNTAX Integer32
MAX-ACCESS read-create
STATUS current
DESCRIPTION
"The value which is written to the MIB object pointed to by
schedVariable when the scheduler invokes an action. The
implementation shall enforce the use of access control
rules when performing the set operation on schedVariable.
This is accomplished by calling the isAccessAllowed abstract
service interface as defined in RFC 2571.
Note that an implementation may choose to issue an SNMP Set
message to the SNMP engine and leave the access control
decision to the normal message processing procedure."
DEFVAL { 0 }
::= { schedEntry 12 }
schedType OBJECT-TYPE
SYNTAX INTEGER {
periodic(1),
calendar(2),
oneshot(3)
}
MAX-ACCESS read-create
STATUS current
DESCRIPTION
"The type of this schedule. The value periodic(1) indicates
that this entry specifies a periodic schedule. A periodic
schedule is defined by the value of schedInterval. The
values of schedWeekDay, schedMonth, schedDay, schedHour
and schedMinute are ignored.
The value calendar(2) indicates that this entry describes a
calendar schedule. A calendar schedule is defined by the
values of schedWeekDay, schedMonth, schedDay, schedHour and
schedMinute. The value of schedInterval is ignored. A
calendar schedule will trigger on all local times that
satisfy the bits set in schedWeekDay, schedMonth, schedDay,
schedHour and schedMinute.
The value oneshot(3) indicates that this entry describes a
one-shot schedule. A one-shot schedule is similar to a
calendar schedule with the additional feature that it
disables itself by changing in the `finished'
schedOperStatus once the schedule triggers an action.
Note that implementations which maintain a list of pending
activations must re-calculate them when this object is
changed."
DEFVAL { periodic }
::= { schedEntry 13 }
schedAdminStatus OBJECT-TYPE
SYNTAX INTEGER {
enabled(1),
disabled(2)
}
MAX-ACCESS read-create
STATUS current
DESCRIPTION
"The desired state of the schedule."
DEFVAL { disabled }
::= { schedEntry 14 }
schedOperStatus OBJECT-TYPE
SYNTAX INTEGER {
enabled(1),
disabled(2),
finished(3)
}
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The current operational state of this schedule. The state
enabled(1) indicates this entry is active and that the
scheduler will invoke actions at appropriate times. The
disabled(2) state indicates that this entry is currently
inactive and ignored by the scheduler. The finished(3)
state indicates that the schedule has ended. Schedules
in the finished(3) state are ignored by the scheduler.
A one-shot schedule enters the finished(3) state when it
deactivates itself.
Note that the operational state must not be enabled(1)
when the schedRowStatus is not active."
::= { schedEntry 15 }
schedFailures OBJECT-TYPE
SYNTAX Counter32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"This variable counts the number of failures while invoking
the scheduled action. This counter at most increments once
for a triggered action."
::= { schedEntry 16 }
schedLastFailure OBJECT-TYPE
SYNTAX SnmpPduErrorStatus
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The most recent error that occurred during the invocation of
a scheduled action. The value noError(0) is returned
if no errors have occurred yet."
DEFVAL { noError }
::= { schedEntry 17 }
schedLastFailed OBJECT-TYPE
SYNTAX DateAndTime
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The date and time when the most recent failure occurred.
The value '0000000000000000'H is returned if no failure
occurred since the last re-initialization of the scheduler."
DEFVAL { '0000000000000000'H }
::= { schedEntry 18 }
schedStorageType OBJECT-TYPE
SYNTAX StorageType
MAX-ACCESS read-create
STATUS current
DESCRIPTION
"This object defines whether this scheduled action is kept
in volatile storage and lost upon reboot or if this row is
backed up by non-volatile or permanent storage.
Conceptual rows having the value `permanent' must allow
write access to the columnar objects schedDescr,
schedInterval, schedContextName, schedVariable, schedValue,
and schedAdminStatus. If an implementation supports the
schedCalendarGroup, write access must be also allowed to
the columnar objects schedWeekDay, schedMonth, schedDay,
schedHour, schedMinute."
DEFVAL { volatile }
::= { schedEntry 19 }
schedRowStatus OBJECT-TYPE
SYNTAX RowStatus
MAX-ACCESS read-create
STATUS current
DESCRIPTION
"The status of this scheduled action. A control that allows
entries to be added and removed from this table.
Note that the operational state must change to enabled
when the administrative state is enabled and the row
status changes to active(1).
Attempts to destroy(6) a row or to set a row
notInService(2) while the operational state is enabled
result in inconsistentValue errors.
The value of this object has no effect on whether other
objects in this conceptual row can be modified."
::= { schedEntry 20 }
schedTriggers OBJECT-TYPE
SYNTAX Counter32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"This variable counts the number of attempts (either
successful or failed) to invoke the scheduled action."
::= { schedEntry 21 }
--
-- Notifications that are emitted to indicate failures. The
-- definition of schedTraps makes notification registrations
-- reversible (see STD 58, RFC 2578).
--
schedTraps OBJECT IDENTIFIER ::= { schedNotifications 0 }
schedActionFailure NOTIFICATION-TYPE
OBJECTS { schedLastFailure, schedLastFailed }
STATUS current
DESCRIPTION
"This notification is generated whenever the invocation of a
scheduled action fails."
::= { schedTraps 1 }
-- conformance information
schedCompliances OBJECT IDENTIFIER ::= { schedConformance 1 }
schedGroups OBJECT IDENTIFIER ::= { schedConformance 2 }
-- compliance statements
schedCompliance2 MODULE-COMPLIANCE
STATUS current
DESCRIPTION
"The compliance statement for SNMP entities which implement
the scheduling MIB."
MODULE -- this module
MANDATORY-GROUPS {
schedGroup2, schedNotificationsGroup
}
GROUP schedCalendarGroup
DESCRIPTION
"The schedCalendarGroup is mandatory only for those
implementations that support calendar based schedules."
OBJECT schedType
DESCRIPTION
"The values calendar(2) or oneshot(3) are not valid for
implementations that do not implement the
schedCalendarGroup. Such an implementation must return
inconsistentValue error responses for attempts to set
schedAdminStatus to calendar(2) or oneshot(3)."
::= { schedCompliances 2 }
schedGroup2 OBJECT-GROUP
OBJECTS {
schedDescr, schedInterval, schedContextName,
schedVariable, schedValue, schedType,
schedAdminStatus, schedOperStatus, schedFailures,
schedLastFailure, schedLastFailed, schedStorageType,
schedRowStatus, schedTriggers
}
STATUS current
DESCRIPTION
"A collection of objects providing scheduling capabilities."
::= { schedGroups 4 }
schedCalendarGroup OBJECT-GROUP
OBJECTS {
schedLocalTime, schedWeekDay, schedMonth,
schedDay, schedHour, schedMinute
}
STATUS current
DESCRIPTION
"A collection of objects providing calendar based schedules."
::= { schedGroups 2 }
schedNotificationsGroup NOTIFICATION-GROUP
NOTIFICATIONS {
schedActionFailure
}
STATUS current
DESCRIPTION
"The notifications emitted by the scheduler."
::= { schedGroups 3 }
--
-- Deprecated compliance and conformance group definitions
-- from RFC 2591.
--
schedCompliance MODULE-COMPLIANCE
STATUS deprecated
DESCRIPTION
"The compliance statement for SNMP entities which implement
the scheduling MIB."
MODULE -- this module
MANDATORY-GROUPS {
schedGroup, schedNotificationsGroup
}
GROUP schedCalendarGroup
DESCRIPTION
"The schedCalendarGroup is mandatory only for those
implementations that support calendar based schedules."
OBJECT schedType
DESCRIPTION
"The values calendar(2) or oneshot(3) are not valid for
implementations that do not implement the
schedCalendarGroup. Such an implementation must return
inconsistentValue error responses for attempts to set
schedAdminStatus to calendar(2) or oneshot(3)."
::= { schedCompliances 1 }
schedGroup OBJECT-GROUP
OBJECTS {
schedDescr, schedInterval, schedContextName,
schedVariable, schedValue, schedType,
schedAdminStatus, schedOperStatus, schedFailures,
schedLastFailure, schedLastFailed, schedStorageType,
schedRowStatus
}
STATUS deprecated
DESCRIPTION
"A collection of objects providing scheduling capabilities."
::= { schedGroups 1 }
END

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,118 @@
HCNUM-TC DEFINITIONS ::= BEGIN
IMPORTS
MODULE-IDENTITY, mib-2, Counter64
FROM SNMPv2-SMI
TEXTUAL-CONVENTION
FROM SNMPv2-TC;
hcnumTC MODULE-IDENTITY
LAST-UPDATED "200006080000Z"
ORGANIZATION "IETF OPS Area"
CONTACT-INFO
" E-mail: mibs@ops.ietf.org
Subscribe: majordomo@psg.com
with msg body: subscribe mibs
Andy Bierman
Cisco Systems Inc.
170 West Tasman Drive
San Jose, CA 95134 USA
+1 408-527-3711
abierman@cisco.com
Keith McCloghrie
Cisco Systems Inc.
170 West Tasman Drive
San Jose, CA 95134 USA
+1 408-526-5260
kzm@cisco.com
Randy Presuhn
BMC Software, Inc.
Office 1-3141
2141 North First Street
San Jose, California 95131 USA
+1 408 546-1006
rpresuhn@bmc.com"
DESCRIPTION
"A MIB module containing textual conventions
for high capacity data types. This module
addresses an immediate need for data types not directly
supported in the SMIv2. This short-term solution
is meant to be deprecated as a long-term solution
is deployed."
REVISION "200006080000Z"
DESCRIPTION
"Initial Version of the High Capacity Numbers
MIB module, published as RFC 2856."
::= { mib-2 78 }
CounterBasedGauge64 ::= TEXTUAL-CONVENTION
STATUS current
DESCRIPTION
"The CounterBasedGauge64 type represents a non-negative
integer, which may increase or decrease, but shall never
exceed a maximum value, nor fall below a minimum value. The
maximum value can not be greater than 2^64-1
(18446744073709551615 decimal), and the minimum value can
not be smaller than 0. The value of a CounterBasedGauge64
has its maximum value whenever the information being modeled
is greater than or equal to its maximum value, and has its
minimum value whenever the information being modeled is
smaller than or equal to its minimum value. If the
information being modeled subsequently decreases below
(increases above) the maximum (minimum) value, the
CounterBasedGauge64 also decreases (increases).
Note that this TC is not strictly supported in SMIv2,
because the 'always increasing' and 'counter wrap' semantics
associated with the Counter64 base type are not preserved.
It is possible that management applications which rely
solely upon the (Counter64) ASN.1 tag to determine object
semantics will mistakenly operate upon objects of this type
as they would for Counter64 objects.
This textual convention represents a limited and short-term
solution, and may be deprecated as a long term solution is
defined and deployed to replace it."
SYNTAX Counter64
ZeroBasedCounter64 ::= TEXTUAL-CONVENTION
STATUS current
DESCRIPTION
"This TC describes an object which counts events with the
following semantics: objects of this type will be set to
zero(0) on creation and will thereafter count appropriate
events, wrapping back to zero(0) when the value 2^64 is
reached.
Provided that an application discovers the new object within
the minimum time to wrap it can use the initial value as a
delta since it last polled the table of which this object is
part. It is important for a management station to be aware
of this minimum time and the actual time between polls, and
to discard data if the actual time is too long or there is
no defined minimum time.
Typically this TC is used in tables where the INDEX space is
constantly changing and/or the TimeFilter mechanism is in
use.
Note that this textual convention does not retain all the
semantics of the Counter64 base type. Specifically, a
Counter64 has an arbitrary initial value, but objects
defined with this TC are required to start at the value
zero. This behavior is not likely to have any adverse
effects on management applications which are expecting
Counter64 semantics.
This textual convention represents a limited and short-term
solution, and may be deprecated as a long term solution is
defined and deployed to replace it."
SYNTAX Counter64
END

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,389 @@
HOST-RESOURCES-TYPES DEFINITIONS ::= BEGIN
IMPORTS
MODULE-IDENTITY, OBJECT-IDENTITY FROM SNMPv2-SMI
hrMIBAdminInfo, hrStorage, hrDevice FROM HOST-RESOURCES-MIB;
hostResourcesTypesModule MODULE-IDENTITY
LAST-UPDATED "200003060000Z" -- 6 March, 2000
ORGANIZATION "IETF Host Resources MIB Working Group"
CONTACT-INFO
"Steve Waldbusser
Postal: Lucent Technologies, Inc.
1213 Innsbruck Dr.
Sunnyvale, CA 94089
USA
Phone: 650-318-1251
Fax: 650-318-1633
Email: waldbusser@ins.com
In addition, the Host Resources MIB mailing list is dedicated
to discussion of this MIB. To join the mailing list, send a
request message to hostmib-request@andrew.cmu.edu. The mailing
list address is hostmib@andrew.cmu.edu."
DESCRIPTION
"This MIB module registers type definitions for
storage types, device types, and file system types.
After the initial revision, this module will be
maintained by IANA."
REVISION "200003060000Z" -- 6 March 2000
DESCRIPTION
"The original version of this module, published as RFC
2790."
::= { hrMIBAdminInfo 4 }
-- Registrations for some storage types, for use with hrStorageType
hrStorageTypes OBJECT IDENTIFIER ::= { hrStorage 1 }
hrStorageOther OBJECT-IDENTITY
STATUS current
DESCRIPTION
"The storage type identifier used when no other defined
type is appropriate."
::= { hrStorageTypes 1 }
hrStorageRam OBJECT-IDENTITY
STATUS current
DESCRIPTION
"The storage type identifier used for RAM."
::= { hrStorageTypes 2 }
hrStorageVirtualMemory OBJECT-IDENTITY
STATUS current
DESCRIPTION
"The storage type identifier used for virtual memory,
temporary storage of swapped or paged memory."
::= { hrStorageTypes 3 }
hrStorageFixedDisk OBJECT-IDENTITY
STATUS current
DESCRIPTION
"The storage type identifier used for non-removable
rigid rotating magnetic storage devices."
::= { hrStorageTypes 4 }
hrStorageRemovableDisk OBJECT-IDENTITY
STATUS current
DESCRIPTION
"The storage type identifier used for removable rigid
rotating magnetic storage devices."
::= { hrStorageTypes 5 }
hrStorageFloppyDisk OBJECT-IDENTITY
STATUS current
DESCRIPTION
"The storage type identifier used for non-rigid rotating
magnetic storage devices."
::= { hrStorageTypes 6 }
hrStorageCompactDisc OBJECT-IDENTITY
STATUS current
DESCRIPTION
"The storage type identifier used for read-only rotating
optical storage devices."
::= { hrStorageTypes 7 }
hrStorageRamDisk OBJECT-IDENTITY
STATUS current
DESCRIPTION
"The storage type identifier used for a file system that
is stored in RAM."
::= { hrStorageTypes 8 }
hrStorageFlashMemory OBJECT-IDENTITY
STATUS current
DESCRIPTION
"The storage type identifier used for flash memory."
::= { hrStorageTypes 9 }
hrStorageNetworkDisk OBJECT-IDENTITY
STATUS current
DESCRIPTION
"The storage type identifier used for a
networked file system."
::= { hrStorageTypes 10 }
-- Registrations for some device types, for use with hrDeviceType
hrDeviceTypes OBJECT IDENTIFIER ::= { hrDevice 1 }
hrDeviceOther OBJECT-IDENTITY
STATUS current
DESCRIPTION
"The device type identifier used when no other defined
type is appropriate."
::= { hrDeviceTypes 1 }
hrDeviceUnknown OBJECT-IDENTITY
STATUS current
DESCRIPTION
"The device type identifier used when the device type is
unknown."
::= { hrDeviceTypes 2 }
hrDeviceProcessor OBJECT-IDENTITY
STATUS current
DESCRIPTION
"The device type identifier used for a CPU."
::= { hrDeviceTypes 3 }
hrDeviceNetwork OBJECT-IDENTITY
STATUS current
DESCRIPTION
"The device type identifier used for a network interface."
::= { hrDeviceTypes 4 }
hrDevicePrinter OBJECT-IDENTITY
STATUS current
DESCRIPTION
"The device type identifier used for a printer."
::= { hrDeviceTypes 5 }
hrDeviceDiskStorage OBJECT-IDENTITY
STATUS current
DESCRIPTION
"The device type identifier used for a disk drive."
::= { hrDeviceTypes 6 }
hrDeviceVideo OBJECT-IDENTITY
STATUS current
DESCRIPTION
"The device type identifier used for a video device."
::= { hrDeviceTypes 10 }
hrDeviceAudio OBJECT-IDENTITY
STATUS current
DESCRIPTION
"The device type identifier used for an audio device."
::= { hrDeviceTypes 11 }
hrDeviceCoprocessor OBJECT-IDENTITY
STATUS current
DESCRIPTION
"The device type identifier used for a co-processor."
::= { hrDeviceTypes 12 }
hrDeviceKeyboard OBJECT-IDENTITY
STATUS current
DESCRIPTION
"The device type identifier used for a keyboard device."
::= { hrDeviceTypes 13 }
hrDeviceModem OBJECT-IDENTITY
STATUS current
DESCRIPTION
"The device type identifier used for a modem."
::= { hrDeviceTypes 14 }
hrDeviceParallelPort OBJECT-IDENTITY
STATUS current
DESCRIPTION
"The device type identifier used for a parallel port."
::= { hrDeviceTypes 15 }
hrDevicePointing OBJECT-IDENTITY
STATUS current
DESCRIPTION
"The device type identifier used for a pointing device
(e.g., a mouse)."
::= { hrDeviceTypes 16 }
hrDeviceSerialPort OBJECT-IDENTITY
STATUS current
DESCRIPTION
"The device type identifier used for a serial port."
::= { hrDeviceTypes 17 }
hrDeviceTape OBJECT-IDENTITY
STATUS current
DESCRIPTION
"The device type identifier used for a tape storage device."
::= { hrDeviceTypes 18 }
hrDeviceClock OBJECT-IDENTITY
STATUS current
DESCRIPTION
"The device type identifier used for a clock device."
::= { hrDeviceTypes 19 }
hrDeviceVolatileMemory OBJECT-IDENTITY
STATUS current
DESCRIPTION
"The device type identifier used for a volatile memory
storage device."
::= { hrDeviceTypes 20 }
hrDeviceNonVolatileMemory OBJECT-IDENTITY
STATUS current
DESCRIPTION
"The device type identifier used for a non-volatile memory
storage device."
::= { hrDeviceTypes 21 }
-- Registrations for some popular File System types,
-- for use with hrFSType.
hrFSTypes OBJECT IDENTIFIER ::= { hrDevice 9 }
hrFSOther OBJECT-IDENTITY
STATUS current
DESCRIPTION
"The file system type identifier used when no other
defined type is appropriate."
::= { hrFSTypes 1 }
hrFSUnknown OBJECT-IDENTITY
STATUS current
DESCRIPTION
"The file system type identifier used when the type of
file system is unknown."
::= { hrFSTypes 2 }
hrFSBerkeleyFFS OBJECT-IDENTITY
STATUS current
DESCRIPTION
"The file system type identifier used for the
Berkeley Fast File System."
::= { hrFSTypes 3 }
hrFSSys5FS OBJECT-IDENTITY
STATUS current
DESCRIPTION
"The file system type identifier used for the
System V File System."
::= { hrFSTypes 4 }
hrFSFat OBJECT-IDENTITY
STATUS current
DESCRIPTION
"The file system type identifier used for
DOS's FAT file system."
::= { hrFSTypes 5 }
hrFSHPFS OBJECT-IDENTITY
STATUS current
DESCRIPTION
"The file system type identifier used for OS/2's
High Performance File System."
::= { hrFSTypes 6 }
hrFSHFS OBJECT-IDENTITY
STATUS current
DESCRIPTION
"The file system type identifier used for the
Macintosh Hierarchical File System."
::= { hrFSTypes 7 }
hrFSMFS OBJECT-IDENTITY
STATUS current
DESCRIPTION
"The file system type identifier used for the
Macintosh File System."
::= { hrFSTypes 8 }
hrFSNTFS OBJECT-IDENTITY
STATUS current
DESCRIPTION
"The file system type identifier used for the
Windows NT File System."
::= { hrFSTypes 9 }
hrFSVNode OBJECT-IDENTITY
STATUS current
DESCRIPTION
"The file system type identifier used for the
VNode File System."
::= { hrFSTypes 10 }
hrFSJournaled OBJECT-IDENTITY
STATUS current
DESCRIPTION
"The file system type identifier used for the
Journaled File System."
::= { hrFSTypes 11 }
hrFSiso9660 OBJECT-IDENTITY
STATUS current
DESCRIPTION
"The file system type identifier used for the
ISO 9660 File System for CD's."
::= { hrFSTypes 12 }
hrFSRockRidge OBJECT-IDENTITY
STATUS current
DESCRIPTION
"The file system type identifier used for the
RockRidge File System for CD's."
::= { hrFSTypes 13 }
hrFSNFS OBJECT-IDENTITY
STATUS current
DESCRIPTION
"The file system type identifier used for the
NFS File System."
::= { hrFSTypes 14 }
hrFSNetware OBJECT-IDENTITY
STATUS current
DESCRIPTION
"The file system type identifier used for the
Netware File System."
::= { hrFSTypes 15 }
hrFSAFS OBJECT-IDENTITY
STATUS current
DESCRIPTION
"The file system type identifier used for the
Andrew File System."
::= { hrFSTypes 16 }
hrFSDFS OBJECT-IDENTITY
STATUS current
DESCRIPTION
"The file system type identifier used for the
OSF DCE Distributed File System."
::= { hrFSTypes 17 }
hrFSAppleshare OBJECT-IDENTITY
STATUS current
DESCRIPTION
"The file system type identifier used for the
AppleShare File System."
::= { hrFSTypes 18 }
hrFSRFS OBJECT-IDENTITY
STATUS current
DESCRIPTION
"The file system type identifier used for the
RFS File System."
::= { hrFSTypes 19 }
hrFSDGCFS OBJECT-IDENTITY
STATUS current
DESCRIPTION
"The file system type identifier used for the
Data General DGCFS."
::= { hrFSTypes 20 }
hrFSBFS OBJECT-IDENTITY
STATUS current
DESCRIPTION
"The file system type identifier used for the
SVR4 Boot File System."
::= { hrFSTypes 21 }
hrFSFAT32 OBJECT-IDENTITY
STATUS current
DESCRIPTION
"The file system type identifier used for the
Windows FAT32 File System."
::= { hrFSTypes 22 }
hrFSLinuxExt2 OBJECT-IDENTITY
STATUS current
DESCRIPTION
"The file system type identifier used for the
Linux EXT2 File System."
::= { hrFSTypes 23 }
END

Some files were not shown because too many files have changed in this diff Show More