summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* nagios-plugins: Added heal info monitoringSahina Bose2016-03-241-1/+5
| | | | | | | | | | | | | | 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-addons: pep8 fixes.Darshan N2015-08-161-1/+1
| | | | | | | Change-Id: I920ed33f0e257dd741d1c6df39b46efebe9abd02 Signed-off-by: Darshan N <dnarayan@redhat.com> Reviewed-on: http://review.gluster.org/11836 Reviewed-by: Sahina Bose <sabose@redhat.com>
* server-plugin: To check if any vol has server side quorumv1.1.0Sahina Bose2015-05-311-1/+1
| | | | | | | | | | | | | | | | 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-2/+2
| | | | | | | | | | 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
* autoconf: validate the nagios server address in auto-configRamesh Nachimuthu2015-05-192-0/+90
| | | | | | | | | | | | | | | | | | | | | Currently Nagios server address entered by the user during auto config was not being verified. This patch helps to verify the address entered by the user. If IP address is given as the nagios server address then it checks the pattern and verifies that it is mapped to one of the non loopback device in the host If user enters fqdn name, then it tries to resolve it, also it verifies that resolved IP address maps to one of the non loopback device in the host. Bug-Url: https://bugzilla.redhat.com/1127657 Change-Id: I88d67cc6d8fa05f2934922fbc0d8e757b1d73e43 Signed-off-by: Ramesh Nachimuthu <rnachimu@redhat.com> Reviewed-on: http://review.gluster.org/7740 Reviewed-by: darshan n <dnarayan@redhat.com> Reviewed-by: Sahina Bose <sabose@redhat.com>
* autoconfig: avoid renaming hostnames in nagiosRamesh Nachimuthu2014-10-291-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Auto Config tries to use the output of 'hostname' command as a host_name for node in nagios. But if the hostnames are not unique, then it uses IP Address as node_name name in nagios. If after removal of a node, hostnames becomes unique then auto config renames all the host configuration in nagios to their hostnames instead of ip address. It creates multiples issues like removing all the nodes, loss of time series data and unnecessary confusion to the user. Fixing this issue by retaining the perviously configured host names always by going through the host uuid. So if duplication comes after a node addition then only that node will be configured with ip address as host_name but all other existing hosts will not be touched. Similary, even though there is no duplication after the removal of a node with duplicate name, auto config will retain the previously configured hostnames (which are ip addresss becasue there was a hostname duplication earlier) instead of renaming. Change-Id: I0abef47e2e495a591dd3901d2b1766a04c59a701 Bug-Url: https://bugzilla.redhat.com/1139228 Bug-Url: https://bugzilla.redhat.com/1139505 Signed-off-by: Ramesh Nachimuthu <rnachimu@redhat.com> Reviewed-on: http://review.gluster.org/8699 Reviewed-by: darshan n <dnarayan@redhat.com> Reviewed-by: Sahina Bose <sabose@redhat.com>
* fix pep8 errorsTimothy Asir Jeyasingh2014-06-262-2/+2
| | | | | | | | 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>
* nagios-server-addons: Check hosts status using NRPEShubhendu Tripathi2014-05-302-47/+0
| | | | | | | | | | | | | Enabled to execute check_nrpe for a given host to check its status. Change-Id: I938b78fcbf52cd46f4f493e2c2b8b927614834eb Bug-URL: https://bugzilla.redhat.com/show_bug.cgi?id=1102506 Signed-off-by: Shubhendu Tripathi <shtripat@redhat.com> Reviewed-on: http://review.gluster.org/7923 Reviewed-by: Ramesh N <rnachimu@redhat.com> Reviewed-by: Kanagaraj M <kmayilsa@redhat.com> Reviewed-by: Timothy Asir <tim.gluster@gmail.com>
* server-plugins: Corrected cluster utilization when volume stoppedSahina Bose2014-05-291-37/+46
| | | | | | | | | | Corrected the message returned by plugin when all volumes in cluster are stopped Change-Id: Ie5e0fbbb10fa7d2787a82e1caa7ca86e8c7010a3 Bug-Url: https://bugzilla.redhat.com/1096730 Signed-off-by: Sahina Bose <sabose@redhat.com> Reviewed-on: http://review.gluster.org/7780
* autoconfig:mock pynag in auto config test caseRamesh Nachimuthu2014-05-291-3/+1
| | | | | | | | | | | | Mocking pynag using dicts in test cases Change-Id: I7ddedb640910c8dca0b79d17efe5e6eeefc9ee6f 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/7921 Reviewed-by: Kanagaraj M <kmayilsa@redhat.com> Reviewed-by: Sahina Bose <sabose@redhat.com>
* autoconfig: refactoring and adding test casesRamesh Nachimuthu2014-05-282-6/+101
| | | | | | | | | | | | 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: create quota/geo rep services conditionallyRamesh Nachimuthu2014-05-231-41/+61
| | | | | | | | | | | 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>
* nagios-server-addons: NRPE command with timeoutShubhendu Tripathi2014-05-201-4/+6
| | | | | | | | | | | | | | | | | | | | | | | Introduced a utility method to return a NRPE base command with timeout set externally. Currently if a plugin internally executes NRPE to get the details from the node, there is no mechanism that timeout could be set to more than 10 sec. This method provides the NRPE command with timeout (if passed). This is required for some of the NRPE calls where gluster commands get executed and they might take more time. All the plugins, which execute a NRPE within, can provide optional command line argument for timeout, and same can be used for forming the proper NRPE call with timeout value. Change-Id: Id97624df743664a320a585acc4a85cfcf64d0a07 Signed-off-by: Shubhendu Tripathi <shtripat@redhat.com> Reviewed-on: http://review.gluster.org/7682 Reviewed-by: Sahina Bose <sabose@redhat.com> Tested-by: Sahina Bose <sabose@redhat.com>
* autoconf: don't remove disconnected hosts from nagiosRamesh Nachimuthu2014-05-122-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | 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>
* 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-2/+7
| | | | | | | | | | | | 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>
* autoconf: handle exceptions in nrpe commandsRamesh Nachimuthu2014-05-041-3/+3
| | | | | | | | | Handling the exceptions and failure from NRPE commands. Change-Id: I36cba2d6adf8484ba134ad3f7aec77437ba07857 Signed-off-by: Ramesh Nachimuthu <rnachimu@redhat.com> Reviewed-on: http://review.gluster.org/7659 Reviewed-by: Sahina Bose <sabose@redhat.com>
* autoconf: discover volume list and info separatelyRamesh Nachimuthu2014-05-021-11/+30
| | | | | | | | | | | | | NRPE doesn't support transfering large junk of data as a result. Hence we have to discover the volume details one by one. First fetch the volume list using 'discover_volume_list' NRPE command then fetch the brick details of volume one by one using 'discover_volume_info' NRPE command Change-Id: I2cd3c2309ffa2f1bf5c271e06dd03ade75bf5d92 Signed-off-by: Ramesh Nachimuthu <rnachimu@redhat.com> Reviewed-on: http://review.gluster.org/7631 Reviewed-by: Sahina Bose <sabose@redhat.com>
* plugins: Server side plugin for geo-repSahina Bose2014-05-011-1/+5
| | | | | | | | | 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: 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-292-21/+63
| | | | | | | | | 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>
* autoconf: use host uuid to indentity bricksRamesh Nachimuthu2014-04-291-5/+4
| | | | | | | 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-293-7/+95
| | | | | | | | 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>
* autocof: adding volume name as part of brick servicesRamesh Nachimuthu2014-04-291-5/+6
| | | | | | | | | 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>
* SNMP Trap Support : SNMP notification on status changeNishanth Thomas2014-04-291-2/+2
| | | | | | | | | | | These plugins will generate SNMP traps when there is a host or service state change in Nagios. Plugged into the Nagios Notification mechanism and uses netsnmp utils to generate SNMP traps Addressed the review comments Change-Id: I42c4d1968a48bc80e767f6fbc24d1637a92d21b0 Signed-off-by: Nishanth Thomas <nthomas@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>
* AutoDiscovery: Auto discovery for gluster entitiesRamesh Nachimuthu2014-04-292-0/+75
| | | | | | | | | | 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>
* nagios-server-addons: Test case for host event handlerShubhendu Tripathi2014-04-291-0/+89
| | | | | | | | | | | Added unit test cases for host event handler with minor code fixes Change-Id: Id9516303aaa1e4f14e781a06d4f73158bfcdebf4 Signed-off-by: Shubhendu Tripathi <shtripat@redhat.com> Reviewed-on: https://code.engineering.redhat.com/gerrit/21669 Reviewed-by: Darshan Narayana Murthy <dnarayan@redhat.com> Reviewed-by: Sahina Bose <sabose@redhat.com>
* rhsc-nagios-addon: Fixed test case failuresShubhendu Tripathi2014-04-291-1/+1
| | | | | | | | | Fixed test case failures for check_remote_host plugin Change-Id: I12a2b6c26d3ed9e2afe2901b0ce51e78027cb211 Signed-off-by: Shubhendu Tripathi <shtripat@redhat.com> Reviewed-on: https://code.engineering.redhat.com/gerrit/21946 Reviewed-by: Sahina Bose <sabose@redhat.com>
* test: Fixing the test case failure Fixing the failure due to hardcoded var pathSahina Bose2014-04-291-1/+1
| | | | | | Change-Id: I74b85fdcf85e407379a79fe002257dbbe1a8013f Signed-off-by: Sahina Bose <sabose@redhat.com> Reviewed-on: https://cuckoo.blr.redhat.com:8443/58
* nagios-server-addons: Check remote host pluginShubhendu Tripathi2014-04-291-34/+13
| | | | | | | | | | Plugins to ckeck the remote host status based on various services. Change-Id: I1e260829901aa8dd831f0ca1d58609addb9bcf1b Signed-off-by: Shubhendu Tripathi <shtripat@redhat.com> Reviewed-on: https://cuckoo.blr.redhat.com:8443/9 Reviewed-by: Sahina Bose <sabose@redhat.com> Tested-by: Sahina Bose <sabose@redhat.com>
* plugins: Plugin to check the cluster utilizationSahina Bose2014-04-292-0/+81
| | | | | | | | | | | | | | | This plugin sums up the volume utilization outputs in a cluster Added a utils livestatus for common code related to mk_livestatus Added constants for livestatussocket path Change-Id: Id665ad3aaa1140e54c831d721ee874421ae84fa3 Signed-off-by: Sahina Bose <sabose@redhat.com> Reviewed-on: https://cuckoo.blr.redhat.com:8443/10 Reviewed-by: Bala FA <barumuga@redhat.com>
* Notification: Notification handler for ovirt notificationRamesh Nachimuthu2014-04-292-0/+93
| | | | | | | | | | | | | | | | | | | | | | Added a new notification handler to notify nagios events to ovirt. A new contact ovirt is added with the handler which can sent events/alerts to ovirt engine using Rest API. By default all gluster related configuration entities like host, volume, gluster, bricks will have this contact. By default contact ovirt will have some default values for ovirt engie rest api and user fields. User has to fill the right values in ovirt contact defined in gluster-contacts.cfg file. Ovirt password has to be configured as a user variable $USER3$ in file /etc/nagios/private/resource.cfg. User variable $USER3$ used in command to pass the password to the handler. Change-Id: I19074af6ae1ee4a8c16d8821b10a1c3a345f321a Signed-off-by: Ramesh Nachimuthu <rnachimu@redhat.com> Reviewed-on: https://cuckoo.blr.redhat.com:8443/8 Reviewed-by: Timothy Asir <tim.gluster@gmail.com> Reviewed-by: Sahina Bose <sabose@redhat.com>
* all: import plugins/templates/config from githubv0.1.0Bala.FA2014-04-292-0/+68
| | | | | | | | | All plugins/templates/config are imported from https://github.com/gluster-rhsc/nagios-plugin.git Change-Id: Icbbf23c0595e2b36548015489341d9ff823bac50 Signed-off-by: Bala.FA <barumuga@redhat.com> Reviewed-on: https://cuckoo.blr.redhat.com:8443/6
* Initial commitBala.FA2014-04-296-0/+526
Change-Id: Iae865d7dce78de83f0931d99b67455b9a0f12e1c Signed-off-by: Bala.FA <barumuga@redhat.com>