Ad Widget

Collapse

Zimbra Web Monitoring

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nobody
    Junior Member
    • Jul 2013
    • 17

    #1

    Zimbra Web Monitoring

    Firstly: I would like to thank the community and developers for creating such amazing software.

    Secondly: I need some help with some Web Monitoring issue's that I am facing. I have been diligently working on trying to get it working for the past couple days, however it doesn't appear many people are trying to monitor Zimbra through the webUI (Except one in a foreign language that Google translate was kind enough to solve for me).

    I am trying to Monitor a Zimbra mail installation, by logging in and confirming that the text "New Message" is actually present (Similar to "Compose" button in Gmail). Thus we know if our customers can access the mail server, before we start getting complaints.

    I am using a server (With installed Zabbix Agent) to monitor multiple things on that host including processor load, networking statistics, etc; thus I do not believe that the agent or the network is the issue. One of the Web Monitoring Scenarios I have set up is to monitor our companies home page, which appears to work flawlessly. I am currently running Zabbix 2.0.6.

    I have the following configurations:

    Application: Actualdomain.com
    Name: Zimbra Web Access Check
    Authentication: None
    Update Interval (In sec): 300
    Agent: Internet Explorer 10.0
    Variables:
    {username}=TestUser
    {password}=t3stingp4ssw3rt
    Active: [X]
    I have tried with and without Authentication: Basic and None, neither work. Basic Authentication is the "Popup Login" dialog box? (that's easy to bruteforce.....?) If memory serves me correctly: "Server at 1.1.1.1 is requesting login credentials. Username: Password: [OK]".??? Is this type of 'Basic Authentication'.... .htaccess provides a similar authentication method, if not the same one. </rant>


    Steps:
    1:
    Name: Zimbra Web Access Check
    URL: https://mail.actualdomain.com
    Post:
    loginOP=login?username={username}&password={passwo rd}&client=preferred&enter=Sign In
    Timeout: 15
    Required String: New Message
    Required Status Codes: 200
    I have tried different variations of the Post crafted URL. According to HttpFox this is the correct format.
    However, when I manually submit this crafted URL, Zimbra login autofills the username upon submission of the URL, but doesn't fill in the password. It doesn't appear that Firefox is autofilling this information in, as I have it disabled by default.



    2:
    Name: Zimbra Logout
    URL: https://mail.actualdomain.com
    Post: ?loginOP=logout
    timeout 15
    Required string: title
    Required status codes: 200
    (It appears that the "Required String" field doesn't like any HTML tags (Is this due to Regex incompatibilities or improper santization?)

    Zabbix complains:
    Step "Zimbra Web Access Check" [1 of 2] failed: Required pattern not found

    Thanks In Advance,
    Nobody

    [P.S. Has anyone gotten "Enterprise Grade" Snmptraps working with Zabbix? Aside from the single 'hostname' reporting that the Bash and Perl scripts provide? SNMPTT, snmptrapd and the script seems overly ridiculous solution to a simple standardized reporting method.]
    Last edited by nobody; 17-07-2013, 23:57. Reason: SOLVED!
  • nobody
    Junior Member
    • Jul 2013
    • 17

    #2
    SOLVED!

    Alright, so some DOCUMENTATION TIME!

    I got it to log into Zimbra, which is HTTPS. A few tools I recommend downloading are: HTTPFOX for Firefox (or equivalent for Chrome). and Links, Links (text based) is an awesome web browser which doesn't render scripting languages such as Javascript or any of that other crazy stuff. This will give you a fairly accurate display for what Zabbix will encounter.

    What I did for Zabbix is as follows (Documented like crazy because I know it'll help someone down the road):

    Choose a host that you can assign to doing website checking tasks, for us it was a video compression server. Create an Application, call it something: We'll call ours FreeBeer.local
    The password is something about password or popcorn, I couldn't decide on which one to choose. They should obviously be changed to be the 'same' as you're logging into the same resource (presumably).

    Authentication is only for POPUP window authentication, such as you see when you're trying to access a .htaccess protected page or resource. This should be set to NONE.

    Then I filled out the fields as follows:

    See Images!

    Notice the transition from http to https, this is because it was due to a redirect. But notice how the status codes are all 200! For what ever reason Zabbix didn't handle the redirect as an HTTP 302. Not sure why, maybe it doesn't have the support built in and just defaults to HTTP 200 or what ever.
    The reason why I used Required String of the [AT]FreeBeer[dot]local is because I knew that the contents (thank you HTTPFOX add on), would contain all my emails in a crazy array, including email addresses, body text and subjects. This validates that it logged in successfully.

    You should avoid using special characters like <title> html tags, I think this is because CURL might try to interpret them with special regex meanings or something. I don't know, it just doesn't work for me :P
    Attached Files
    Last edited by nobody; 18-07-2013, 00:01. Reason: SOLVED!

    Comment

    Working...