Ad Widget

Collapse

check ftp file is changed

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • alainseys1988
    Junior Member
    • May 2020
    • 4

    #1

    check ftp file is changed

    Hy,

    i have an inquery for you guys we have an ftp server that we have acces to a specefic directory here is a file writen to multiple times a day.
    I want to check by intervals if the file is changed eg the last 2 hours if not this should be reported in zabbix.

    is this possible ?
    If so can you point me how to do this ?

    so we need to figure it out how to login in to the ftp server and get the file inormation (the file name is static and does not change)

    i cant install an agent on the ftp since we only have access to the directory and not the server itself

    thanks
  • Answer selected by alainseys1988 at 16-12-2021, 16:03.
    vicbc
    Member
    • Nov 2021
    • 39

    Hey Alainseys.

    I think it will depend on how much access you have to that ftp server.
    If you have SSH access to it, you could write a script inside you Zabbix Server/Proxy that performs a checksum of the remote file you're monitoring.
    Then create a trigger with the function Diff that will alert you everytime the file has being modified.
    Depending on how ofter the file is modified, it could be a problematic Trigger tho, since it would be alerting everytime.

    If you don't have access to the server with SSH, it may be possible to validate this with some FTP utility (nothing comes to my mind in this moment).
    First step is, how you can gather the checksum of the file from your Zabbix Server, after that, just write a script that does that.

    Hope it helps, let us know.

    Cheers.

    Comment

    • vicbc
      Member
      • Nov 2021
      • 39

      #2
      Hey Alainseys.

      I think it will depend on how much access you have to that ftp server.
      If you have SSH access to it, you could write a script inside you Zabbix Server/Proxy that performs a checksum of the remote file you're monitoring.
      Then create a trigger with the function Diff that will alert you everytime the file has being modified.
      Depending on how ofter the file is modified, it could be a problematic Trigger tho, since it would be alerting everytime.

      If you don't have access to the server with SSH, it may be possible to validate this with some FTP utility (nothing comes to my mind in this moment).
      First step is, how you can gather the checksum of the file from your Zabbix Server, after that, just write a script that does that.

      Hope it helps, let us know.

      Cheers.

      Comment

      • alainseys1988
        Junior Member
        • May 2020
        • 4

        #3
        Originally posted by vicbc
        Hey Alainseys.

        I think it will depend on how much access you have to that ftp server.
        If you have SSH access to it, you could write a script inside you Zabbix Server/Proxy that performs a checksum of the remote file you're monitoring.
        Then create a trigger with the function Diff that will alert you everytime the file has being modified.
        Depending on how ofter the file is modified, it could be a problematic Trigger tho, since it would be alerting everytime.

        If you don't have access to the server with SSH, it may be possible to validate this with some FTP utility (nothing comes to my mind in this moment).
        First step is, how you can gather the checksum of the file from your Zabbix Server, after that, just write a script that does that.

        Hope it helps, let us know.

        Cheers.
        Hy,

        thanks for the info i ended up with running a python script from a zabbix agent that connects to the ftp server and checks the date of the file and perform a date diference check between current server date and file date if this is bigger than 1 day this will report to zabbix.

        Comment

        • cyber
          Senior Member
          Zabbix Certified SpecialistZabbix Certified Professional
          • Dec 2006
          • 4806

          #4
          Or you can just report that date back to zabbix with each check and let zabbix take care of calculating.
          Just different approach to problem...

          Comment

          Working...