Ad Widget

Collapse

Monitor number of files in folder

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dominic
    Junior Member
    • Sep 2005
    • 3

    #1

    Monitor number of files in folder

    Hello,

    i will monitor the files in a folder.
    If more the 5 files longer then 10 minutes exists Zabbix should send an e-mail.

    I have created a external command that gives me the number of files in a folder.

    Code:
    ls /Temp/ | wc -l
    But what trigger I have to use?

    I have tried:
    Code:
    {Zabbix:ssh.run[TestSUN,172.16.48.20,22,].last(600)}>1
    {Zabbix:ssh.run[TestSUN,172.16.48.20,22,].nodata(600)}>1
    It will not work. I always get directly an e-mail if a file in the folder exists.

    Can someone help me with the trigger?

    Regards
    Dominic
  • dmartel
    Junior Member
    • Jun 2013
    • 7

    #2
    Hi,

    What I did at my work, I've created a Perl script that analyses the content of an XML file and at the end, writes the data into a file and sends data to Zabbix through zabbix_sender.

    I'm sure you could do your own script, executed at an interval (by cron task) to fit your needs!

    David

    Comment

    • dominic
      Junior Member
      • Sep 2005
      • 3

      #3
      Hallo,

      is there no way to monitor a value for a given time without an external script like Perl?
      If the value for example is 1 for 5 minutes then send a e-mail?

      I think that should be a basic function of Zabbix.
      Is there a way to get it in the next release of Zabbix?

      Regards
      Dominic

      Comment

      Working...