Ad Widget

Collapse

Difference in notifications

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Yevgeniy Semerikov
    Junior Member
    • Jun 2014
    • 8

    #1

    Difference in notifications

    Hello!

    I'm configured an item like "vfs.file.contents[/etc/group]" and trigger for it like "{Template OS AIX:vfs.file.contents[/etc/group].diff(0)}=1". This works fine when file /etc/group changed, but in notifications I get full content of file /etc/group. There is any way to get in notifications only difference between previous and last value, e.g. UNIX diff command output?
  • Yevgeniy Semerikov
    Junior Member
    • Jun 2014
    • 8

    #2
    No one know solution for this, except scripting?

    Comment

    • aib
      Senior Member
      • Jan 2014
      • 1615

      #3
      I can offer unusual way to do it.
      1) create an Item "group_diff" with SSH_agent type.
      in "Executed script" write a command which compare two files. (diff group group_saved, for example)

      2) create an item "group_backup" with ssh_agent type
      in "Executed script" write a command which Backup group file, if it changes. (for example, mv group_saved group_20141231; cp group group_saved)

      3) create a Trigger which will switch if "group_diff" is not empty

      OK?
      Sincerely yours,
      Aleksey

      Comment

      • Yevgeniy Semerikov
        Junior Member
        • Jun 2014
        • 8

        #4
        Thanks aib,

        I'm was considering a similar path, with using a agent-side script to do this, but I was hoping that there is a built-in path.

        If there no built-in way to do this, then I have to use the script.

        Comment

        • aib
          Senior Member
          • Jan 2014
          • 1615

          #5
          if there no built-in way to do this, then i have to use the script.
          ...увы...
          Sincerely yours,
          Aleksey

          Comment

          Working...