summaryrefslogtreecommitdiffstats
path: root/plugins/config_generator.py
Commit message (Collapse)AuthorAgeFilesLines
* nagios-plugins: Added heal info monitoringSahina Bose2016-03-241-0/+15
| | | | | | | | | | | | | | Added a plugin to monitor heal info for a volume Corrected pep8 errors Changed default monitoring interval to 1 min for heal info monitoring Bug-Url: https://bugzilla.redhat.com/1267586 BUG: 1267586 Change-Id: I1c51d4d0f2129a7bb19f44b63382fcfc7384dc40 Signed-off-by: Sahina Bose <sabose@redhat.com> Reviewed-on: http://review.gluster.org/12262 Reviewed-by: Ramesh N <rnachimu@redhat.com>
* server-plugin: To check if any vol has server side quorumv1.1.0Sahina Bose2015-05-311-2/+3
| | | | | | | | | | | | | | | | Added a server side plugin to change status from Pending to OK/UNKNOWN depending on if volumes have server side quorum turned on Renamed service to ensure service definition gets updated on upgrades. Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1106421 Change-Id: I1f1ca1dcf56872342ec8e25396a89163d22aedeb Signed-off-by: Sahina Bose <sabose@redhat.com> Reviewed-on: http://review.gluster.org/8023 Reviewed-by: darshan n <dnarayan@redhat.com> Reviewed-by: Ramesh N <rnachimu@redhat.com>
* nagios-config: Rename self-heal status pluginSahina Bose2015-05-281-1/+1
| | | | | | | | | | Renaming self-heal status plugin to split-brain status Change-Id: Icdb934904eda9c47ccdc4ba41a9204048918f0a9 Bug-Url: https://bugzilla.redhat.com/1221872 Signed-off-by: Sahina Bose <sabose@redhat.com> Reviewed-on: http://review.gluster.org/10908
* fix pep8 errorsTimothy Asir Jeyasingh2014-06-261-30/+31
| | | | | | | | Change-Id: Ia0f570dfb74d6c41484e509f704df12d3b96db17 Signed-off-by: Timothy Asir Jeyasingh <tjeyasin@redhat.com> Reviewed-on: http://review.gluster.org/8161 Tested-by: Timothy Asir <tim.gluster@gmail.com> Reviewed-by: Shubhendu Tripathi <shtripat@redhat.com>
* autoconfig: refactoring and adding test casesRamesh Nachimuthu2014-05-281-15/+19
| | | | | | | | | | | | Refactoring the code to use constants for repeatedly used strings and add some test case. Change-Id: I7c88231a51ceea3b1cc94223018ecc704b657512 Bug-Url: https://bugzilla.redhat.com/1099093 Bug-Url: https://bugzilla.redhat.com/1099328 Signed-off-by: Ramesh Nachimuthu <rnachimu@redhat.com> Reviewed-on: http://review.gluster.org/7883 Reviewed-by: Sahina Bose <sabose@redhat.com>
* autoConfig:Support for force syncing specific fields in service configRamesh Nachimuthu2014-05-281-15/+20
| | | | | | | | | | | | | | | | | | | Currently Auto-config won't update any service configurations in nagios. It always adds or deletes services configurations but no update. With the following bugs we have the need to update few values in service configuration. Hence adding the support to update specific fields in service config. All the fields in the list config_generator.SERVICE_FIELDS_TO_FORCE_SYNC will be force updated during auto configuration. With this patch only '_VOL_NAME' and 'notes' field will be updated. Change-Id: I6003ade375d2f0d6e7dee97ef05f7a9af4ce6ffd Bug-Url: https://bugzilla.redhat.com/1099093 Bug-Url: https://bugzilla.redhat.com/1099328 Signed-off-by: Ramesh Nachimuthu <rnachimu@redhat.com> Reviewed-on: http://review.gluster.org/7868 Reviewed-by: Sahina Bose <sabose@redhat.com>
* autoConfig: create quota/geo rep services conditionallyRamesh Nachimuthu2014-05-231-10/+12
| | | | | | | | | | | Create QUOTA and GEO Replication status services for volume only when respective services are enabled in gluster. Bug-Url: https://bugzilla.redhat.com/1099731 Change-Id: I9813a64f7d2573aaf3b23534643662e198b5457d Signed-off-by: Ramesh Nachimuthu <rnachimu@redhat.com> Reviewed-on: http://review.gluster.org/7838 Reviewed-by: Sahina Bose <sabose@redhat.com>
* autoconfig: delete only auto generated configs in auto-configRamesh Nachimuthu2014-05-231-0/+2
| | | | | | | | | | | | | | | | Currently auto-config removes all the custom services and hosts defined by user. So with this issue, user can't add any extra services on top of services generated by auto-config. Adding a custom filed '__GENERATED_BY_AUTOCONFIG' as part of all the services added by auto-config. Only services with the above custom field will be deleted by auto-config when respective volume/brick/ is removed in gluster. Change-Id: I85d3d971d3b99f52ff603044f7f974746e247737 Signed-off-by: Ramesh Nachimuthu <rnachimu@redhat.com> Reviewed-on: http://review.gluster.org/7750 Reviewed-by: Sahina Bose <sabose@redhat.com>
* autoconf: don't remove disconnected hosts from nagiosRamesh Nachimuthu2014-05-121-9/+13
| | | | | | | | | | | | | | | | | | | | | | | | | Currently auto-config removes all the hosts with disconnected status in 'peer status' from nagios configuration. But that is not correct as a host can goto disconnected status for many differnt reasons and we should not remove the configuration. Similarly disconnected hosts need not be added to nagios configuration during auto discovery. Fixing this by ingnoring all the disconnected hosts in delta calculation. Note: Host name can't be used to identify disconnected hosts as we may not be able to communicate the disconnected host to get the host name. Hence Host UUID in peer status is used to intentify the host. Bug-Url: https://bugzilla.redhat.com/1091170 Change-Id: I3fe730d2545f8cbc8224c576712b09bb4c16e712 Signed-off-by: Ramesh Nachimuthu <rnachimu@redhat.com> Reviewed-on: http://review.gluster.org/7677 Reviewed-by: Sahina Bose <sabose@redhat.com>
* autoconfig: Corrected comparison for volume typeSahina Bose2014-05-081-1/+1
| | | | | | | | | | | The self heal service is only added for a replicate volume type. Corrected the comparison to do so. Change-Id: I78c783bbe9b2f17dc1d5cfa7d86d9a69690be3cd Signed-off-by: Sahina Bose <sabose@redhat.com> Reviewed-on: http://review.gluster.org/7711 Reviewed-by: Ramesh N <rnachimu@redhat.com> Tested-by: Ramesh N <rnachimu@redhat.com>
* server-addons: add active checks for gluster processRamesh Nachimuthu2014-05-071-1/+1
| | | | | | | | | | | Adding checks for gluster process and bricks. Change-Id: Ie688233db2a5da0d1a26d5576507559e7e8f5d2d Signed-off-by: Ramesh Nachimuthu <rnachimu@redhat.com> Reviewed-on: http://review.gluster.org/7697 Reviewed-by: Kanagaraj M <kmayilsa@redhat.com> Reviewed-by: Shubhendu Tripathi <shtripat@redhat.com> Reviewed-by: Sahina Bose <sabose@redhat.com>
* refactored service description for gluster servicesKanagaraj M2014-05-051-1/+1
| | | | | | | | | | | | | | service descriptions: - Gluster Management - NFS - Self-Heal - Quota - Brick - <brick_dir> Change-Id: I3ece94ef61fcb3fd264e848508362375842dcc6f Signed-off-by: Kanagaraj M <kmayilsa@redhat.com> Reviewed-on: http://review.gluster.org/7671 Reviewed-by: Sahina Bose <sabose@redhat.com>
* nagios-server: Added quorum service to auto configSahina Bose2014-05-051-1/+10
| | | | | | | | | | | | Added a quorum service to auto-config generator. Renamed "Volume Status Quota" to "Volume Quota" service Change-Id: Id83eefeee63bf7c34373196f4cfa2b326e1cb71d Signed-off-by: Sahina Bose <sabose@redhat.com> Reviewed-on: http://review.gluster.org/7661 Reviewed-by: Kanagaraj M <kmayilsa@redhat.com> Reviewed-by: Ramesh N <rnachimu@redhat.com>
* plugins: Server side plugin for geo-repSahina Bose2014-05-011-0/+16
| | | | | | | | | Added server side plugin option for geo-rep status Change-Id: I6f604862ec7d4813298a670b7ed2cc0b448faf23 Signed-off-by: Sahina Bose <sabose@redhat.com> Reviewed-on: http://review.gluster.org/7592
* autoconf: fix for empty services in hosts.Ramesh Nachimuthu2014-04-301-1/+1
| | | | | | | | | | There were some key errors when there is no service in the hosts. It fixed by using dict.get(). Change-Id: Ic479f5335240c772a520e4ee0e7b41ce85f905e5 Signed-off-by: Ramesh Nachimuthu <rnachimu@redhat.com> Reviewed-on: http://review.gluster.org/7594 Reviewed-by: Sahina Bose <sabose@redhat.com>
* autoconf: Use only brick path in brick serviceRamesh Nachimuthu2014-04-301-4/+2
| | | | | | | | | | | | Change the brick service description to "Brick Status - <brick-path>". Currently it is "Brick Status - <hostaddress>:<brick-path>". Same case for Brick utilization service also. Change-Id: I3924f15e3b8b86826c0019c5ab52bd371a970cf1 Signed-off-by: Ramesh Nachimuthu <rnachimu@redhat.com> Reviewed-on: http://review.gluster.org/7597 Reviewed-by: Sahina Bose <sabose@redhat.com>
* auto config : Enhance the auto config to preserve user changesRamesh Nachimuthu2014-04-291-48/+128
| | | | | | | | | Enhace the auto configuration in nagios to preserve the user changes. pynag apis are used to read/write/update the nagios config files. Change-Id: I6820928fb2b0baff5d6e65c811a48b5ff718f9e3 Signed-off-by: Ramesh Nachimuthu <rnachimu@redhat.com>
* plugins: Server side plugin for self-healSahina Bose2014-04-291-0/+17
| | | | | | | | Server side plugin to check the volume self heal status Change-Id: Ia1ee3fb653913360edb1b54b42cce3ed105bdb79 Signed-off-by: Sahina Bose <sabose@redhat.com>
* autoconf: use host uuid to indentity bricksRamesh Nachimuthu2014-04-291-1/+1
| | | | | | | Using host UUIDs to bricks in host Change-Id: Ie5467b05391f709e292644f00495b41af8213b42 Signed-off-by: Ramesh Nachimuthu <rnachimu@redhat.com>
* autoconf: use host name for host configRamesh Nachimuthu2014-04-291-9/+10
| | | | | | | | Discover the host name configured for the gluster node and use the same as host_name in nagios host configuration. Change-Id: Ib9eb8b3f3a1a03d1be28fa2faba44c2fc81fa0cf Signed-off-by: Ramesh Nachimuthu <rnachimu@redhat.com>
* volume status: event handler for brick statusRamesh Nachimuthu2014-04-291-1/+1
| | | | | | | | | Adding an event handler for brick status services. It will reschedule the volume status service to determine the current status of volume after any brick state change Change-Id: I94fa018e5aed15be53f45506f1a38efd698eca79 Signed-off-by: Ramesh Nachimuthu <rnachimu@redhat.com>
* autocof: adding volume name as part of brick servicesRamesh Nachimuthu2014-04-291-2/+7
| | | | | | | | | Currently there is no way to identify the volume from brick services. Hence adding volume name as custom variable and note in brick services Change-Id: If1ef000196dca2239f713fe41d033d8a4161d6c0 Signed-off-by: Ramesh Nachimuthu <rnachimu@redhat.com>
* autoconf: fix adding volume status quota serviceKanagaraj M2014-04-291-0/+1
| | | | | | | | Volume Quota status service was not appended to the service list. Fixed it now. Change-Id: Ia327deefc855619848a7d9ba0e41c155e2c15aa0 Signed-off-by: Kanagaraj M <kmayilsa@redhat.com>
* Cluster Status: Plugin to display the overall status of clusterNishanth Thomas2014-04-291-1/+1
| | | | | | | | | This plugin use mk-livestatus to retrieve the status of the all the volumes and provide aggregrate status of the cluster Addressed review comments Change-Id: Ia83b41cfdc6dcfc1f379c024ba6ea33f9ccfe598 Signed-off-by: Nishanth Thomas <nthomas@redhat.com>
* autoconf: add brick/volume status serviceRamesh Nachimuthu2014-04-291-5/+9
| | | | | | | | Adding services for brick and volume status in auto config Change-Id: Ic4a885f0b0f83294c21e9d8e0c22c720e0866a94 Signed-off-by: Ramesh Nachimuthu <rnachimu@redhat.com>
* plugins: Added quota NRPE to volume statusSahina Bose2014-04-291-1/+16
| | | | | | | | | | Added a way to query for quota status to the check_vol_server plugin This will poll for quota status only if the service status for quota returns non-OK status Change-Id: I6260042ef54308a1f4f7b6d482a2b58a4682d36c Signed-off-by: Sahina Bose <sabose@redhat.com>
* Server-addons: Server-side plugin for volume status.ndarshan2014-04-291-2/+2
| | | | | | | | | | | Modified the existing volume utilization server plugin to include status information as well. Refactored the plugin with an argument -o|--option to get the specific volume status. Change-Id: I2b6f8612e32390fb20917098a255de1ee6b3a170 Signed-off-by: ndarshan <dnarayan@redhat.com> Signed-off-by: Sahina Bose <sabose@redhat.com>
* autoconf: fix for pep8 errorRamesh Nachimuthu2014-04-291-1/+1
| | | | | | | Fixing the pep8 error Change-Id: I437a7dc1502c19b3ab90ad5b8c8cb1862b9ba359 Signed-off-by: Ramesh Nachimuthu <rnachimu@redhat.com>
* autoconf: refactoring auto confRamesh Nachimuthu2014-04-291-5/+6
| | | | | | | | | | | | | | Following small changes have been made in auto conf. 1. Create Cluster utilization service only when there is atleast one volume in the cluster. 2. Change the auto config to use the same host given during manual run for further auto syncing. 3. Change the "gluster_auto_discovery" command to passss the cluster name to auto discovery using $HOSTNAME$ macro Change-Id: Id30e0794d98ada4a0276af0c17781f8742dc14e5 Signed-off-by: Ramesh Nachimuthu <rnachimu@redhat.com>
* AutoDiscovery: Auto discovery for gluster entitiesRamesh Nachimuthu2014-04-291-0/+186
Basic plugin which will discover all the basic gluster entities and creates nagios configuration. Change-Id: I71f05dec9bcce74969db300393f7f7c178161dba Signed-off-by: Ramesh Nachimuthu <rnachimu@redhat.com> Reviewed-on: https://code.engineering.redhat.com/gerrit/22100 Reviewed-by: Sahina Bose <sabose@redhat.com>