Ad Widget

Collapse

IT Services calculation

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hannibal20
    Junior Member
    • Jan 2007
    • 22

    #1

    IT Services calculation

    Hi,

    I have a problem with SLA propagation. Steps taken:

    1. created a custom key (based on file checksum)
    2. created a simple trigger (fires off when file checksum changes, disaster level)
    3. created a service linked with my trigger, no algorithm, not showing SLA
    4. created a higher level service, show SLA, MIN algorithm
    5. linked pt. 3. as a child to pt. 4

    Now when I fire off my trigger, service form pt. 3 changes ststus to disaster, the status propagates to service from pt. 4, but time still is counted for the 'OK' time, not for the 'Problem' time.

    Server log says:

    Code:
    15183:20070605:104210 Query failed: [insert into service_alarms(serviceid,clock,value) values(10,1181032930,5)] Duplicate entry '0' for key 1 [1062]
    I'm using the 1.4
  • hannibal20
    Junior Member
    • Jan 2007
    • 22

    #2
    patch

    this seems to solve the problem

    Code:
    *** src/libs/zbxdbhigh/db.c_orig        Tue Jun  5 12:52:57 2007
    --- src/libs/zbxdbhigh/db.c     Tue Jun  5 13:03:58 2007
    ***************
    *** 429,435 ****
                    return SUCCEED;
            }
      
    !       DBexecute("insert into service_alarms(serviceid,clock,value) values(" ZBX_FS_UI64 ",%d,%d)",
                    serviceid,
                    clock,
                    status);
    --- 429,436 ----
                    return SUCCEED;
            }
      
    !       DBexecute("insert into service_alarms(servicealarmid,serviceid,clock,value) values(" ZBX_FS_UI64 "," ZBX_FS_UI64 ",%d,%d)",
    !               DBget_maxid("service_alarms","servicealarmid"),
                    serviceid,
                    clock,
                    status);

    Comment

    Working...