Ad Widget

Collapse

Get file or folder attribute

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jcduss59
    Member
    • Jun 2011
    • 33

    #1

    Get file or folder attribute

    Hello Everyone,


    Do you know if there's a way using an embedded item key (such as vfs.file.chksum for example) to check file attributes?

    I have an internal script which is executable and I would like to check if nobodys remove the "x" right on it.

    Also if you know how to check file owner, it will be great!

    If it doesn't exist, I'll make a feature request!!

    Thanks.
  • jcduss59
    Member
    • Jun 2011
    • 33

    #2
    Up please!

    Comment

    • Colttt
      Senior Member
      Zabbix Certified Specialist
      • Mar 2009
      • 878

      #3
      you can define a user-parameter:
      Code:
      UserParameter=file.owner,ls -la FILE |awk {'print $3'}
      Debian-User

      Sorry for my bad english

      Comment

      • jcduss59
        Member
        • Jun 2011
        • 33

        #4
        Ok.

        I hoped I should do it in different way. But it seems it's the only way.

        It should be embedded in vfs.file.attrib for examples.


        Thank you for your reply!

        Comment

        Working...