Command

  • 23 Oct

    How do I use Zabbix to monitor the status of my tasks

    Q: How do I use Zabbix to monitor the status of my tasks.

    What: We are looking to monitor some of our Limagito tasks inside Zabbix using the rule event in Limagito.

    Why: Example, we have an SLA for a specific service, we monitor the hardware services etc in Zabbix

    Some of those services depends on file being moved by LIMAGITO.

    How: I need to execute a CMD with parameter on event success and on event fail so I can communicate to my Zabbix server.

    Could you give me some assistance as to how I can run an .exe with parameters whenever a task is successful/unsuccessful?

    A: In version v2023.10.23.0 we added our ‘Command Line’ option to the Rule Events. This should make it possible to use any Command Line tool like the one from Zabbix (zabbix_sender.exe).
    limagito file mover rule events
    Example for the ‘On Success’ event. We have no idea about the zabbix_sender Command Line tool parameters, this is just an example from their website.
    You’ll need to enable the ‘On Error’ event too and add the Command Setup for this event also (with other zabbix_sender parameters).
    We have set the ‘Max Time After Beginning’ to 30 seconds. This prevents the command from hanging in case there is an issue with the command Line tool.
    limagito file mover use Zabbix to monitor the status
    Maybe it is a good idea to enable ‘Success event memory’ and ‘Error event Memory’. This way the event will only be triggered when the status changes between Success  <> Error and not with every Success and Error event.
    limagito file mover rule events setup

    #zabbix #cmd #filetransfer #filemanagement

    If you need any help with this ‘use Zabbix to monitor the status’ request, please let us know.

    Best Regards,

    Limagito Team

    By Limagito-Team Command Events , ,
  • 04 Jun

    Execute Command, continuing on error

    Q: Execute Command, continuing on error. I have a rule which moves a file from one win folder to another win folder and then runs a CMD against it. If the CMD errors out it keeps retrying the file. How do I move the failed file to another folder on the error and NOT retry it with the command line?
    My current setup is:

    • WIN as Source
    • Destinations:
      1. WIN
      2. CMD (Execute Command)

    A: In our latest version v2022.6.2.0 we added a new ‘Redirect ExitCode to PS Integer Var A (%VIA)’ option. Please check the ‘Advanced Tab’ of the CMD (Command) as Destination. Enable this option to transfer the ExitCode to our Pascal Script Integer Var psVIA. We’ll use the psVIA var to move the source file in case the Command returns a value <> 0 (which normally is an errorcode).

    Limagito File Mover continuing on error

    We will need a third ‘Pascal Script’ as Destination.

    1) WIN as Destination
    2) CMD as Destination
    Now please add a third ‘Pascal Script’ Destination. This must be in the last position. Do not forget to adjust the Const ctErrorPath value. This Pascal Script will move the source file to an error path if the ExitCode of the CMD (command) <> 0.

    Limagito File Mover Destination Setup

    Const
      ctErrorPath = 'C:\3ProcessError\'; // must end with a /
    Begin
      psExitCode:= 1;
      // ... add your code here
      If psVIA <> 0 Then
      Begin
        psMoveFile(psFilePath + psFileName, ctErrorPath + psFileName);
        psLogwrite(1, '', 'CMD ExitCode Error, psVIA: ' + IntToStr(psVIA));
      End;
    End.
    Limagito File Mover Pascal Script as Destination

    #Filetransfer #Filemanagement

    If you need any info about this ‘continuing on error’ request, please let us know.

    Best regards,

    Limagito Team

  • 27 Dec

    Execute a command line tool after processing multiple files successfully

    Q: Howto execute a command line tool after processing multiple files successfully. I have a rule that moves 1 or more files and starts a uses the command option After copy/move/delete success to run an executable. I could get 1 file or I could get more every day. If I receive 1 file everything is good but if I receive more than 1 file then the rule is trying to process all the files individually where I need it to run the exe after all files are moved. Is there a setting to move all the files then run the exe, I think I’ve had this issue before but I just can’t remember how I fixed it.

    A: We added a new option in version v2021.12.26.0 to achieve this.

    Command, On Rule End Execute Condition option (v2021.12.26.0) [+]

    In your case we should not use ‘After copy/move/delete success’ because this is triggered for each file. Instead, select and enable the ‘On Rule End’ Command instead AND with ‘On Rule End’ selected do enable the ‘All files successful’ Execute Condition option in the Advanced Tab.

    Limagito File Mover Execute Command Condition

    #FileTransfer

    If you need any info about this ‘after processing multiple files’ question, please let us know.

    Best regards,

    Limagito Team

    By Limagito-Team Command , , ,
1 2 3 4
SEARCH