summaryrefslogtreecommitdiffstats
path: root/plugins/discovery.py
Commit message (Collapse)AuthorAgeFilesLines
* autoconf: send email notification for auto syncRamesh Nachimuthu2014-05-021-11/+33
| | | | | | | | | | | | | | | | Sending a cusotm email notification whenever nagios configurations are changed by auto-config service. note: By default, nagios mail notification command 'notify-service-by-email' doesn't include the comments macro. But in auto config, all the changes are sent as comment to the custom notificiation command. Hence nagios command 'notify-service-by-email' should be changed to include the macro '$NOTIFICATIONCOMMENT$' as part of mail template. Change-Id: Ie5dd23578e08fbc757c46a884a79923ff3c403b2 Signed-off-by: Ramesh Nachimuthu <rnachimu@redhat.com> Reviewed-on: http://review.gluster.org/7626 Reviewed-by: Sahina Bose <sabose@redhat.com>
* autoconf: discover volume list and info separatelyRamesh Nachimuthu2014-05-021-2/+16
| | | | | | | | | | | | | 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>
* autoconf:fix for pep8 errorRamesh Nachimuthu2014-05-011-3/+3
| | | | | | | | | fixing a pep8 error in discovery.py Change-Id: I2cbacea466e0d178636c00d7212d107fd82f2719 Signed-off-by: Ramesh Nachimuthu <rnachimu@redhat.com> Reviewed-on: http://review.gluster.org/7628 Reviewed-by: Kanagaraj M <kmayilsa@redhat.com>
* autoconf: fix for empty services in hosts.Ramesh Nachimuthu2014-04-301-6/+6
| | | | | | | | | | 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: Configure the nodes in auto-config using NRPERamesh Nachimuthu2014-04-301-14/+105
| | | | | | | | | | | Addning an NRPE command to configure all the newly added nodes to used passive check results using NSCA. It is done using the NRPE command 'configure_gluster_node'. Change-Id: I75d0214c8c52afdedd13dac3f38d52abc4ca5a93 Signed-off-by: Ramesh Nachimuthu <rnachimu@redhat.com> Reviewed-on: http://review.gluster.org/7593 Reviewed-by: Sahina Bose <sabose@redhat.com>
* autoconf: fix for pep 8 errorRamesh Nachimuthu2014-04-291-2/+2
| | | | | Change-Id: I8b662cb36921d62f14eb9af7660585ffc30f94d1 Signed-off-by: Ramesh Nachimuthu <rnachimu@redhat.com>
* auto config : Enhance the auto config to preserve user changesRamesh Nachimuthu2014-04-291-33/+258
| | | | | | | | | 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-2/+2
| | | | | | | 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-45/+38
| | | | | | | | 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-13/+8
| | | | | | | | | 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: don't restart nagios if it is stoped.Ramesh Nachimuthu2014-04-291-2/+18
| | | | | | | | | | | Autoconfig script get struck when user runs the script without starting the nagios. Fixed it by checking the nagios service status before restarting. Now autoconfig will restart the nagios only if it started already by the user. Bug-Url: https://bugzilla.redhat.com/1084975 Change-Id: I1582d06abe764e6f2ae2c63d4a2e7169f0b11aa5 Signed-off-by: Ramesh Nachimuthu <rnachimu@redhat.com>
* Autoconfig:Modified the discoverlogicalelementsNishanth Thomas2014-04-291-5/+3
| | | | | | | | | | | | to accept the new format of data receieved from the node. removed the call to get the hostname of the gluster node Change-Id: I99a48cfe03672ee419ea5f586aa35b4b3ab325af Signed-off-by: Nishanth Thomas <nthomas@redhat.com> Reviewed-on: https://code.engineering.redhat.com/gerrit/22549 Reviewed-by: Kanagaraj Mayilsamy <kmayilsa@redhat.com> Tested-by: Ramesh Nachimuthu <rnachimu@redhat.com>
* AutoDiscovery: Auto discovery for gluster entitiesRamesh Nachimuthu2014-04-291-0/+138
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>