Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Administrators

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #41 (permalink)  
Old 02-24-2010, 07:36 PM
Loyal Member
 
Posts: 76
Default I'm an idiot

Quote:
Originally Posted by LMStone View Post
Hmmm...

Likely with this typo in nrpe.cfg you are not getting any warning emails from Nagios because the command isn't running:

Code:
commad[check_mailq]=/usr/lib/nagios/plugins/check_mailq -w 3 -c 50 -M postfix
If you change "commad" to "command" that should get things working -- unless I missed some other typos!

All the best,
Mark
Wow, that would be epic if that was the problem. It was showing up green in Nagios though. I sent a couple massive emails through my server to see if I would get a warning message and never got one. I'll give it another shot after correcting that typo.
Reply With Quote
  #42 (permalink)  
Old 02-24-2010, 07:44 PM
Loyal Member
 
Posts: 76
Default

Quote:
Originally Posted by buee View Post
Wow, that would be epic if that was the problem. It was showing up green in Nagios though. I sent a couple massive emails through my server to see if I would get a warning message and never got one. I'll give it another shot after correcting that typo.
OK: mailq (1) is below threshold (3/50)

I love it. Thanks guys.
Reply With Quote
  #43 (permalink)  
Old 02-24-2010, 07:50 PM
Moderator
 
Posts: 1,209
Default

Hmmm... If the Nagios host web interface shows that the remote mailq is OK but the mailq command isn't defined in nrpe.cfg on the remote host, that's a problem; it shouldn't work.

You may wish to check that your config files on the Nagios host are actually running nrpe checks on the remote host, and not local checks of the Nagios host itself.

Why do I say this you might ask?

The first time I was setting up a Nagios system years ago I got stuck and couldn't figure out why on the five hosts I was monitoring all the disk sizes and free space were the same. Then I Googled and saw lots of other Nagios noobs made the same mistake, so I didn't feel too bad!

To confirm, take a look at the service check definition on the Nagios host and make sure the commandline is actually calling check_nrpe...

Code:
# Service definition
define service{
        use                             RelNet-service               ; Name of service template to use
        host_name                       RelNet-Zimbra-Mail2
        service_description             Anti-Virus
        check_command                   check_nrpe!check_clamd
        }
Hope that helps,
Mark
__________________
___________________________________
L. Mark Stone, CIO


"Uptime. All the time."

477 Congress Street | Portland, ME 04101-3431 | (207) 772-5678

proactive maintenance and monitoring | technology consulting
Zimbra groupware | EMR implementations | private cloud hosting

Last edited by LMStone; 02-24-2010 at 07:57 PM..
Reply With Quote
  #44 (permalink)  
Old 02-24-2010, 08:15 PM
Loyal Member
 
Posts: 76
Default

Quote:
Originally Posted by LMStone View Post
Hmmm... If the Nagios host web interface shows that the remote mailq is OK but the mailq command isn't defined in nrpe.cfg on the remote host, that's a problem; it shouldn't work.

You may wish to check that your config files on the Nagios host are actually running nrpe checks on the remote host, and not local checks of the Nagios host itself.

Why do I say this you might ask?

The first time I was setting up a Nagios system years ago I got stuck and couldn't figure out why on the five hosts I was monitoring all the disk sizes and free space were the same. Then I Googled and saw lots of other Nagios noobs made the same mistake, so I didn't feel too bad!

To confirm, take a look at the service check definition on the Nagios host and make sure the commandline is actually calling check_nrpe...

Code:
# Service definition
define service{
        use                             RelNet-service               ; Name of service template to use
        host_name                       RelNet-Zimbra-Mail2
        service_description             Anti-Virus
        check_command                   check_nrpe!check_clamd
        }
Hope that helps,
Mark
That was actually my first problem, I hadn't had it checking NRPE. Then I configured the mail queue on the local machine and not on the remote server. But working through my own brain farts, I got it to the point where it was green on Nagios. But, it wouldn't throw flags or emails no matter what I threw at that server. I found that my mail server can apparently take quite a few more clients on because it was processing mail faster than I could send it. I got all the kinks ironed out and I'm confident that it's working now.
Reply With Quote
  #45 (permalink)  
Old 02-25-2010, 06:16 AM
Moderator
 
Posts: 1,209
Default

Glad it's working for you now!

The learning curve for Nagios is very steep, and not very intuitive IMHO (at least to me and the engineers I've trained), so I hope you didn't mind that I asked you to double check some of the basics where I've seen others (and me!) get caught out.

All the best,
Mark
__________________
___________________________________
L. Mark Stone, CIO


"Uptime. All the time."

477 Congress Street | Portland, ME 04101-3431 | (207) 772-5678

proactive maintenance and monitoring | technology consulting
Zimbra groupware | EMR implementations | private cloud hosting
Reply With Quote
  #46 (permalink)  
Old 03-03-2010, 11:01 AM
Member
 
Posts: 11
Default

Quote:
Originally Posted by strube View Post
Looks like http://andreas.ndfnet.de/showfiles/b...ck_zmstatus.pl is no longer up/working. Can somebody post a copy of this script if they have it?

Many thanks.
I second that. That links is down. Can someone provide the plugin?

OK, I've found it! Nagios Exchange - check_zimbra.pl.
Reply With Quote
  #47 (permalink)  
Old 10-19-2010, 02:09 AM
Special Member
 
Posts: 113
Default Check remaining licenses for accounts

Here is my quick and dirty solution to check the number of remaining account licenses. Is far away from perfect, but do the job.

You have to run it as user zimbra a warning and critical integer.

Code:
check_zimbra_license.py -c 6 -w 7
Mostly copied from tech notes > Blog Archive > Nagios plugin template in python for Nagios template and for the XML part PyXMLFAQ -- Python XML Frequently Asked Questions PyXMLFAQ -- Python XML Frequently Asked Questions.

It's written in Python.
Attached Files
File Type: txt check_zimbra_license.py.txt (3.5 KB, 29 views)
Reply With Quote
  #48 (permalink)  
Old 10-19-2010, 06:52 AM
Moderator
 
Posts: 1,209
Default

Jummo,

If you are comfortable doing so, I would submit this code to the Nagios Exchange.

Thanks for submitting this; we should be able to test before the end of the year (we are building a new Nagios server from scratch and slowly migrating all of our configurations over, but have frozen our existing Nagios server's configuration).

All the best,
Mark
__________________
___________________________________
L. Mark Stone, CIO


"Uptime. All the time."

477 Congress Street | Portland, ME 04101-3431 | (207) 772-5678

proactive maintenance and monitoring | technology consulting
Zimbra groupware | EMR implementations | private cloud hosting
Reply With Quote
  #49 (permalink)  
Old 10-20-2010, 01:46 AM
Special Member
 
Posts: 113
Default

Yeah, that's ok for me. Thanks for posting on Nagios Exchange.
Reply With Quote
  #50 (permalink)  
Old 02-24-2011, 09:49 AM
Intermediate Member
 
Posts: 15
Default check zimbra mailq easy fix

all I did was change the value of $utils::PATH_TO_MAILQ in to /usr/local/nagios/libexec/check_mailq

PHP Code:
$utils::PATH_TO_MAILQ "/opt/zimbra/postfix/sbin/mailq"
Quote:
Originally Posted by buee View Post
Hey, I hate to dig up old topics but I'm really hoping to get this one working. When I run /usr/local/nagios/libexec/check_mailq -w 250 -c 500 as root, it comes back correctly. When I run it as nagios, I get
Code:
Program mode requires special privileges, e.g., root or TrustedUser.
CRITICAL: Error code 78 returned from /usr/bin/mailq
even though I've modified the utils.pm file to reflect the mailq in /opt/zimbra. Does something need to be restarted after that?

I've appended the sudoers files with:
Code:
nagios ALL=(zimbra) NOPASSWD: /usr/local/nagios/libexec/check_mailq
And ls -la /usr/bin/sudo shows:
Code:
---s--x--x 2 root root 140744 Mar 24 18:55 /usr/bin/sudo
Just like yours, jummo

What am I missing?
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.