How to read performance logs

Hello Team,

 

Could anyone please let me know how to read performance logs. Is there any function available?

There is a requirement to download performance logs to another file and upload them to another server.

I have tried a couple of them, but it doesnt read the content of it..readcsvlog(csvPath: "engine_summary-1.csv")

Looking forward for some response.

 

Thanks in advance,

Divya

  Discussion posts and replies are publicly visible

Parents
  • Hi Divya - what version of Appian are you running and are you referring to the functions offered up by the Log Reader plug in ?

    I'm using Log Reader functions in 18.2 and they pull back data all ok - you have to specify all optional inputs though if you want to use one optional input (even if null - in my experience)

    readcsvlogpaging(csvPath, startIndex, batchSize, filterColumName, filterOperator, filterValue, timestampColumnName, timestampStart, timestampEnd)

  • 0
    A Score Level 1
    in reply to paulc919
    Hello,

    I am using 18.3 version. Still getting null values.

    readcsvlogpaging(
    csvPath: "engine_summary-1.csv",
    startIndex: 1,
    batchSize: - 1,
    filterColumName: null,
    filterOperator: null,
    filterValue: null,
    timestampColumnName: null,
    timestampStart: null,
    timestampEnd: null
    )
  • you'll need to tell the function which folder the log is in - so assuming the log is in the perflogs folder your path ought to be perflogs/engine_summary-1.csv
Reply
  • you'll need to tell the function which folder the log is in - so assuming the log is in the perflogs folder your path ought to be perflogs/engine_summary-1.csv
Children
  • oh and its probably not a good idea to load everything into memory - I use the timestamp filter to only bring in the last two hours worth of activity. Depends on your use case really.
  • 0
    A Score Level 1
    in reply to paulc919
    Thank you
  • Hi, could you share how does the code look like if you want to filter by timestamp? I tried doing so and the filter is not actually applying. Any help is appreciated.

  • Hi

    This is my code - hopefully you can adapt it 

    timestampColumnName: "Timestamp",
    timestampStart: now() - intervalds(
    local!hours,
    0,
    0
    ),
    timestampEnd: now()

    The column name for Timestamp is case sensitive so best to check what it is called on the file you want to look at. I pass in a value which if blank, local!hours defaults to 2 so I get the last two hours of activity from that file. 

    Hope this helps ?

    Cheers

    Paul

  • Hi,

    Is this code still working, when I tried it just gives the columns names from file.