Ad Widget

Collapse

Triggers with an UTC timerange

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • themons
    Senior Member
    • Feb 2005
    • 110

    #1

    Triggers with an UTC timerange

    HEllo,

    I have an item which is a windows service status. This servie have to be up form 13h30 to 21h30 UTC, not loclatime of my zabbix server.

    If somebody have an idea to do this ?

    I have tink to use an another item which is the UTC time of the server, via an UserParameter but I have no idea how to get UTC Time.
    Zabbix 1.8.3
    SLES 11 x64

    French Zabbix user
  • zabbix_zen
    Senior Member
    • Jul 2009
    • 426

    #2
    In UNIX:
    date -u

    In Windows:
    System.currentTimeMillis()

    or using,
    Calendar cal = Calendar.getInstance();
    cal.add(
    Calendar.MILLISECOND,
    -cal.get(Calendar.DST_OFFSET) -
    cal.get(Calendar.ZONE_OFFSET));
    long lUTCtime = cal.getTime();
    which takes into account the summer/winter transition

    Please let us how you configured UserParameter afterwards

    Comment

    Working...