Ad Widget

Collapse

Replace 'simple checks' with Nagios-style plugins

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • monsieurcanard
    Member
    • Mar 2007
    • 40

    #1

    Replace 'simple checks' with Nagios-style plugins

    Hello,

    I have a suggestion for Zabbix. Zabbix is a great product, and I love the way it integrates with MySQL. However, I feel it lacks flexibility for checking services centrally (see my thread at: http://www.zabbix.com/forum/showthread.php?t=5528).

    Proposal

    For this reason, I propose that we replace 'Simple checks' with a plugin-style system, whereby one may place plugins (such as Nagios, fping, etc) in a directory, and the GUI would reflect this in the drop-down lists when choosing a check to run.

    Reasoning

    I think this is a good idea because:
    • The simple checks already rely on 'fping', which is an external program
    • The service_perf() and service() simple checks such as http() only really test for open port as far as I understand it, so it'd be nice to be able to easily replace these with more comprehensive tests (e.g. look for an SMTP banner)
    • The simple checks such as http() are very rigid, and leave no room for extension, except using zabbix_agent, which is not the cleanest method IMHO
    • Plugins would provide huge flexibility
    • Plugins would combine the power of nagios which the features and usability of Zabbix
    • Finally, using plugins would encourage more Nagios users to switch to Zabbix, as there'd be no need to reinvent the wheel


    Implementation

    I believe a patch has already been submitted for this ('external commands'). I think however that this should replace 'simple checks' and be part of the core Zabbix functionality rather than run alongside.

    What does everyone else think? I'm quite new to Zabbix so please don't flame me if I've missed the point or stepped on anyone's toes. I'd just like to know people's ideas on the subjects, and if it was well-received I could write a patch to implement it.

    Best regards,
    Matt
  • monsieurcanard
    Member
    • Mar 2007
    • 40

    #2
    My apologies, it seems this is already on the roadmap:


    But will it replace 'simple checks'?

    Comment

    • James Wells
      Senior Member
      • Jun 2005
      • 664

      #3
      Greetings,

      Perhaps you might want to look at PATCH: External scripts. This patch set was built to solve that exact issue, though it was not accepted for some reason.
      Unofficial Zabbix Developer

      Comment

      • monsieurcanard
        Member
        • Mar 2007
        • 40

        #4
        Indeed, thanks James. As per the link in my post above, it seems that Alexei already has this on the roadmap.

        Comment

        • monsieurcanard
          Member
          • Mar 2007
          • 40

          #5
          I've updated the External Scripts patch for Zabbix 1.3.3 beta - hopefully this will bring it closer to being commited to the Zabbix core once it's tested:

          Comment

          • clahti
            Senior Member
            • Jan 2007
            • 126

            #6
            Originally posted by monsieurcanard
            I've updated the External Scripts patch for Zabbix 1.3.3 beta - hopefully this will bring it closer to being commited to the Zabbix core once it's tested:

            http://www.zabbix.com/forum/showthre...9039#post19039
            As a 7 year reforming Nagios user I fully agree with this. I am currently using Nagios plugins in zabbix for all "simple checks", what I do is write a wrapper script. For example, a wrapper around check_ldap which returns the response time in ms from the ldap server:

            Code:
            #!/usr/bin/perl
            $result = `/usr/lib/nagios/plugins/check_ldap -3 -H ldap.example.com -b dc=example,dc=com`;
            if ($result =~/LDAP OK/) {
                    @fields = split(/=/,$result);
                    my $fragment =  substr $fields[1],0,index($fields[1], 's;');
                    print "$fragment\n";
                    exit 0;
            } else {
                    print "\n";
                    exit 1;
            }
            There is huge mindshare already put into the Nagios plugins, this is the only way I can see currently to use them in Zabbix with no patching. This is added as a UserParameter to the server's Agent. The biggest drawback is that all your "simple checks" then appear as items under the server host, rather than being able to assign them to the actual host in Zabbix. Any idea why the external patch never made it into the official Zabbix codebase?

            Comment

            Working...