Ad Widget

Collapse

Mount discovery by name AND type

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • phil
    Junior Member
    • Feb 2013
    • 4

    #1

    Mount discovery by name AND type

    Trying to have 2 different trigger types for 2 file mount types e.g.:
    /export of type reiserfs and /usr of type ext4

    I can either filter by name OR type on the discovery setup screen. Tried to have 2 discoveries but I can't use twice the discovey item...

    Any ideas on how to do this?
  • BDiE8VNy
    Senior Member
    • Apr 2010
    • 680

    #2
    Firstly you can vote for ZBXNEXT-581 and ZBXNEXT-1606.

    Secondly you could move the condition you originally wanted to use for filtering by separate LLD rules into separate trigger prototypes.
    That way each mounted file system gets both triggers but the unrelated one never gets fired.

    For example (not tested):
    Code:
    {Template OS Linux:vfs.fs.size[{#FSNAME},pfree].last(0)}<10&{#FSNAME}="/export"&{#FSTYPE}="reiserfs"
    {Template OS Linux:vfs.fs.size[{#FSNAME},pfree].last(0)}<20&{#FSNAME}="/usr"&{#FSTYPE}="ext4"

    Comment

    • phil
      Junior Member
      • Feb 2013
      • 4

      #3
      Originally posted by BDiE8VNy
      Firstly you can vote for ZBXNEXT-581 and ZBXNEXT-1606.

      Secondly you could move the condition you originally wanted to use for filtering by separate LLD rules into separate trigger prototypes.
      That way each mounted file system gets both triggers but the unrelated one never gets fired.

      For example (not tested):
      Code:
      {Template OS Linux:vfs.fs.size[{#FSNAME},pfree].last(0)}<10&{#FSNAME}="/export"&{#FSTYPE}="reiserfs"
      {Template OS Linux:vfs.fs.size[{#FSNAME},pfree].last(0)}<20&{#FSNAME}="/usr"&{#FSTYPE}="ext4"
      Thanks. I voted.
      Doesn't seem to be able to take an expression like {#FSTYPE}="ext4". It need to be another item. Tried to create an item that would return the macro value, but did not work...

      Comment

      • phil
        Junior Member
        • Feb 2013
        • 4

        #4
        I created a dummy item in the discovery rule, an external check performed at low frequency: echo["eth1"]. And now I can use it as an item to check against in the trigger condition.
        Will have to wait to see if it actually works, but it did not return any syntax errors...

        Comment

        Working...