(→Sample CRON Table) |
(→Sample CRON Table) |
||
(One intermediate revision by the same user not shown) | |||
Line 27: | Line 27: | ||
This report is a two part report. At the top it will list any devices defined as a switch that has crossed the threshold for capacity, as defined in the Configuration screen '''Reporting''' tab. There are two relevant fields for this report, with the first being the '''Switches''' field. You may either choose the report to work in an OptIn or OptOut mode. In the OptIn mode, you must tag each switch that you wish to report on with the tag, '''Report'''. In the OptOut mode, all switches are reported on by default, and you can exclude individual switches by adding the '''NoReport''' tag to it. The second relevant field is the '''Switch Capacity Threshold''', which is the percentage of total ports occupied before it gets added to this report section. | This report is a two part report. At the top it will list any devices defined as a switch that has crossed the threshold for capacity, as defined in the Configuration screen '''Reporting''' tab. There are two relevant fields for this report, with the first being the '''Switches''' field. You may either choose the report to work in an OptIn or OptOut mode. In the OptIn mode, you must tag each switch that you wish to report on with the tag, '''Report'''. In the OptOut mode, all switches are reported on by default, and you can exclude individual switches by adding the '''NoReport''' tag to it. The second relevant field is the '''Switch Capacity Threshold''', which is the percentage of total ports occupied before it gets added to this report section. | ||
The second part of the report is a listed of documentation exceptions, and is only valid if you have defined SNMP managed switches in your environment. The report will poll each properly defined switch for port status, and if there is a mismatch (a connection is defined, but the link is down; a connection is not defined, but the link is up) it will print into this section. The default setting for this is to OptIn, with a 75% capacity limit. | The second part of the report is a listed of documentation exceptions, and is only valid if you have defined SNMP managed switches in your environment. The report will poll each properly defined switch for port status, and if there is a mismatch (a connection is defined, but the link is down; a connection is not defined, but the link is up) it will print into this section. The default setting for this is to OptIn, with a 75% capacity limit. | ||
+ | |||
+ | * report-em_reservations.php | ||
+ | This report works in conjunction with the Configuration Item "Reservation Expiration". Whenever this report is run - typically as a cron job - it will produce a report of all reservations currently in the | ||
+ | database. A non-zero value for the Reservation Expiration will cause the report to prune any reservations that fall outside of the given grace period (days). The report will include the expired and | ||
+ | removed devices in the email generated. | ||
== Sample CRON Table == | == Sample CRON Table == | ||
Line 34: | Line 39: | ||
<blockquote> | <blockquote> | ||
<pre> | <pre> | ||
− | */5 * * * * (cd /home/www/http/openDCIM; /usr/bin/php /home/www/http/openDCIM/poll_pdu_stats | + | */5 * * * * (cd /home/www/http/openDCIM; /usr/bin/php /home/www/http/openDCIM/poll_pdu_stats.php ) > /dev/null 2>&1 |
*/5 * * * * (cd /home/www/http/openDCIM; /usr/bin/php /home/www/http/openDCIM/poll_temperature_sensors.php ) > /dev/null 2>&1 | */5 * * * * (cd /home/www/http/openDCIM; /usr/bin/php /home/www/http/openDCIM/poll_temperature_sensors.php ) > /dev/null 2>&1 | ||
*/15 * * * * (cd /home/www/http/openDCIM; /usr/bin/php /home/www/http/openDCIM/poll_esx_inventory.php ) > /dev/null 2>&1 | */15 * * * * (cd /home/www/http/openDCIM; /usr/bin/php /home/www/http/openDCIM/poll_esx_inventory.php ) > /dev/null 2>&1 |
Latest revision as of 17:02, 3 March 2019
There are several scripts that need to be run on a periodic basis in order to enable the full feature set of openDCIM.
Polling (SNMP) Jobs
It is up to each site to determine the frequency at which you wish to poll your devices. openDCIM is not intended to be a monitoring system, and as such does not provide any alerting mechanism. However, it is a very useful near-realtime capacity metric system. You must determine the correct balance between what is often enough, and what will overload your system and/or network. As a frame of reference, at Oak Ridge National Laboratory, we poll once every 5 minutes.
- poll_pdu_stats.php
This file will scan the database for properly defined intelligent power strips (defined as having an IP address, community, and template with OIDs) and poll them in database row order. It will update the fac_PDUStats table with the resulting information, and date/time stamp the entry.
- poll_temperature_sensors.php
This file will scan the database for properly defined temperature sensors (defined as having an IP address, community, and template with OIDs) and poll them in database row order. It will update the fac_CabinetTemps table with the resulting information, and date/time stamp the entry.
- poll_esx_inventory.php
This file will scan the database for devices defined as ESX servers, that also have an IP address and SNMP community defined. It will then attempt to poll a VMWare ESX host for an inventory of the current VM images on it, and the state as of the poll (Running or PoweredDown). Note - if you use DRS (Dynamic Resource Scheduling) in your environment, you may see the same image on multiple hosts as running images will transition on an as-needed basis to optimize the environment. Once a host is polled, you may see the existing VM images on the host in the device view. You have the option of assigning each VM to a customer, which will then cause that VM to be reported with the department in the asset reports.
Periodic Report Jobs
There are some reports that are presented in email format, only, as they are specifically designed for automated generation. The suggested frequency is weekly, but you may choose to increase that to whatever you wish. The email is sent to the address defined for Facility Manager Email in the Configuration screen, Email tab.
- report-vmnamecheck.php
This report looks for exceptions to the "I know enough information about this VM" rule - if there is no departmental owner assigned, it will show up in this report. This typically happens when a new Virtual Machine has been provisioned and it is picked up by the poll_esx_inventory.php process.
- report-em_new_installs.php
This report will produce a listing of all systems in the database with an InstallDate of the past N number of days, where N is the number entered for New Installs Period under the Configuration screen, Reporting tab. The default setting for this is 7 days.
- report-em_switch_exceptions.php
This report is a two part report. At the top it will list any devices defined as a switch that has crossed the threshold for capacity, as defined in the Configuration screen Reporting tab. There are two relevant fields for this report, with the first being the Switches field. You may either choose the report to work in an OptIn or OptOut mode. In the OptIn mode, you must tag each switch that you wish to report on with the tag, Report. In the OptOut mode, all switches are reported on by default, and you can exclude individual switches by adding the NoReport tag to it. The second relevant field is the Switch Capacity Threshold, which is the percentage of total ports occupied before it gets added to this report section. The second part of the report is a listed of documentation exceptions, and is only valid if you have defined SNMP managed switches in your environment. The report will poll each properly defined switch for port status, and if there is a mismatch (a connection is defined, but the link is down; a connection is not defined, but the link is up) it will print into this section. The default setting for this is to OptIn, with a 75% capacity limit.
- report-em_reservations.php
This report works in conjunction with the Configuration Item "Reservation Expiration". Whenever this report is run - typically as a cron job - it will produce a report of all reservations currently in the database. A non-zero value for the Reservation Expiration will cause the report to prune any reservations that fall outside of the given grace period (days). The report will include the expired and removed devices in the email generated.
Sample CRON Table
First, if you are unfamiliar with CRON, you need to search your operating system documentation (or the web) for it. This is simply a sample table.
*/5 * * * * (cd /home/www/http/openDCIM; /usr/bin/php /home/www/http/openDCIM/poll_pdu_stats.php ) > /dev/null 2>&1 */5 * * * * (cd /home/www/http/openDCIM; /usr/bin/php /home/www/http/openDCIM/poll_temperature_sensors.php ) > /dev/null 2>&1 */15 * * * * (cd /home/www/http/openDCIM; /usr/bin/php /home/www/http/openDCIM/poll_esx_inventory.php ) > /dev/null 2>&1 0 7 * * 1 (cd /home/www/http/openDCIM; /usr/bin/php /home/www/http/openDCIM/report-em_new_installs.php) > /dev/null 2>&1 0 7 * * 1 (cd /home/www/http/openDCIM; /usr/bin/php /home/www/http/openDCIM/vmnamecheck.php) > /dev/null 2>&1 # 0 7 * * 1 (cd /home/www/http/openDCIM; /usr/bin/php /home/www/http/openDCIM/report-em_switch_exceptions.php) > /dev/null 2>&1 55 10 * * * /usr/bin/mysqldump --opt inventory > /home/www/backup/dcim.sql