Previous 6.5 Bulk configurations Next

6.5.8 Nagios config parser

The measurements in PVSR can be mass-provisioned using Nagios configuration scripts. All the necessary configuration scripts must be concatenated together into one text file and uploaded into PVSR user the “Nagios config parser” menu. The parsed information are:

·       host

·       hostgroup

·       checkcommands

·       services

·       timeperiod

·       Macros, like $USER1$

·       contacts

·       contact_groups

The order of the entries in the file is not relevant.

 

PVSR can create Nagios and non-Nagios measurements and equipments from the uploaded configuration data. The default behavior can be changed for each Nagios service by placing the parameter conversion_to_pvsr into the service’s configuration (into “define service { … }”). The meaning of its values:

·       1: PVSR will create a Nagios measurement even if it is capable of converting the service into a non-Nagios measurement

·       2: PVSR will only create a Nagios measurement and will not convert it to a regular PVSR measurement. However if based on the service it determines that it can monitor the host with one of its data collector (for example SNMP) then it will create the equipment

·       3: PVSR will only create a Nagios measurement and will not convert it to a regular PVSR measurement nor will it create an equipment for it

 

PVSR also creates threshold definitions for the measurements, but the user can choose whether PVSR actually should send notifications or that functionality should remain in Nagios.

 

After the file has been uploaded the user must configure the importing. First he has to choose a site for the import. If that site is the ROOT site then he must specify a site name and PVSR will create that site under the ROOT site and that site will act as the root of the import script. If the user choose another site then this new site is optional, i.e. the root of the import can be the selected site or a newly created site. If the import script tries to create a discoverable equipment (for example it detected that an SNMP capable equipment can be created) then the user has the same choices as with the “New equipments from template” option, i.e. create an equipment, create a job or create a job and also run it immediately. If the upload script cannot convert the Nagios check into a non-Nagios measurement or the converted measurement is a synthetic transaction measurement then PVSR creates one or more SynthTrans equipments based on the “How to create SynthTrans equipments” parameter. Also if the script cannot convert the Nagios check script then it will use the value of the “Nagios User” parameter for running the Nagios checks.

 

The user can specify whether he wants to receive email notifications for the threshold violations or not. If he chooses no then the contacts and contact_groups section from the Nagios configuration file are not needed. The user can also choose when the generated thresholds should be violated: either as soon as the first violating value is measured or only when the original Nagios configuration suggests. Please note that since in PVSR each measurement can only have one collection cycle, PVSR might not be able to raise the alarm exactly after the same time as Nagios would even if this second option is chosen. Example: if the normal check interval of a Nagios check is 1 minute and the max check attempts is 3 then in the first case the threshold will be violated as soon as the measurement arrives into the system, while in the second case it will only be violated after 3 minutes. The second to last threshold related parameter is called “No Warning when Critical” and if it is set to Yes then the Warning level threshold violation will end if the level changes to Critical. The last threshold related parameter lets the user choose a threshold type for the newly created thresholds.

 

Each measurement and equipment can be selected and deselected individually or altogether using the checkbox in the table header. After clicking on the OK button PVSR creates the entries in its database. PVSR also creates virtual equipments representing hosts from Nagios and containing only those measurements which existed as Nagios service checks. Be aware that if the discoverable equipments are created as jobs without immediate running then the import will not be able to create all the necessary threshold definitions and virtual equipments. In such a case a second import is required after all the equipments are created.