Logo Search packages:      
Sourcecode: nagstamon version File versions  Download package

def Nagstamon::nagstamonGUI::GUI::Acknowledge (   self,

    acknowledge miserable host/service

Definition at line 429 of file nagstamonGUI.py.

00429                                  :
            acknowledge miserable host/service
        # various parameters vor the CGI request
        host = self.acknowledge_xml.get_widget("input_label_host").get_text()
        service = self.acknowledge_xml.get_widget("input_label_service").get_text()
        author = self.acknowledge_xml.get_widget("input_entry_author").get_text()
        comment = self.acknowledge_xml.get_widget("input_entry_comment").get_text()
        # check if all services on host should be acknowledged too
        acknowledge_all_services = self.acknowledge_xml.get_widget("input_checkbutton_acknowledge_all_services").get_active()
        # flags for comments as on Nagios web GUI
        # starting with "&" in case all flags are empty, so at least 
        # the query will be glued by &
        flags = "&"
        if self.acknowledge_xml.get_widget("input_checkbutton_sticky_acknowledgement").get_active() == True:
            flags = flags + "sticky_ack=on&"
        if self.acknowledge_xml.get_widget("input_checkbutton_send_notification").get_active() == True:
            flags = flags + "send_notification=on&"
        if self.acknowledge_xml.get_widget("input_checkbutton_persistent_comment").get_active() == True:
            flags = flags + "persistent=on&"
        # create a list of all service of selected host to acknowledge them all
        all_services = list()
        if acknowledge_all_services == True:
            for i in self.popwin.miserable_server.nagitems_filtered["services"].values():
                for s in i:
                    if s.host == host:

        # let thread execute POST request
        acknowledge = nagstamonActions.Acknowledge(server=self.popwin.miserable_server, flags=flags, host=host, service=service, author=author,\
                      comment=comment, acknowledge_all_services=acknowledge_all_services, all_services=all_services)

    def DowntimeDialogShow(self, server, host, service=None):

Generated by  Doxygen 1.6.0   Back to index