Ad Widget

Collapse

Which Marco for error notification?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cphowdy
    Junior Member
    • Jun 2008
    • 5

    #1

    Which Marco for error notification?

    Hey guys,

    I observe a lot websites with (this great tool ) zabbix. But somtimes there appear some errors like "page didn't match" or "timeout reached". I do use the notification and it's working fine. BUT , I want to add a Macro that tells me which errors occured. For example:

    {HOSTNAME}:
    {TRIGGER.NAME}: {STATUS}
    Datum: {DATE} Uhrzeit: {TIME}
    Gescheitert am Schritt Nummer:{ITEM.LASTVALUE}
    Priorität: {TRIGGER.SEVERITY}
    Error: {???? don't know which marco to use} <-- that's my problem
    There should be: " Error: Page didn't match / Timeout reached

    I hope you know what I mean!

    Thanks
  • cphowdy
    Junior Member
    • Jun 2008
    • 5

    #2
    does anybody have an idea?

    Comment

    • cphowdy
      Junior Member
      • Jun 2008
      • 5

      #3
      hey guys
      I solved the problem on my own. We wanted a (email) error notification that looks like that:
      subject: www.google.de webtest failed: ON (step 3)
      Error: Page didn't match or Couldn't resolve hostname ...

      It's a bit tricky but we managed it
      You have to use a script for email or sms service (save it in /home/www/zabbix/bin/scriptname). Our script is the following:

      Code:
      <?php
      $link = mysql_connect('localhost', 'user', 'password');
      mysql_select_db('zabbix', $link);
      $result = mysql_query('SELECT error FROM httptest WHERE name="'.$argv[3].'"');
      $row = mysql_fetch_array($result);
      mysql_close($link);
      
      mail($argv[1], $argv[2], $row[0]);
      ?>
      Add this script into the available mediatype and afterwards select a user who is ought to be informed and choose Skript as medium.

      Hope I could help you with that!
      See you

      It's also possbile to send this notification via SMS. If you want the script ... just pay for a round or just ask me for it.

      Comment

      Working...