questions around "Script Based Custom Agent fields"

COOLNETAU
COOLNETAU Member Posts: 50
edited July 22 in Remote Monitoring

So, I found this. great idea. now what I need to know is how often these scripts are fired?

Oh wait, it is fired when going to the Asset fields.

What confused me was that I had to then back out of the custom fields page and return to it to see the results. - should that not refresh when the script has been run?

Comments

  • dragos.t
    dragos.t Internal, Support Moderator Posts: 51 admin

    Hello @COOLNETAU,

    The script which is attached to a script-based custom field will run once every 12 hours, or when you access the Agent page.

    Please keep in mind that it takes some time for the script to provide the output within the Agent page. It is not instant, you have to wait a couple of minutes.
    If it takes longer, then it could be a script output issue, or the Output type is not selected correctly.

  • COOLNETAU
    COOLNETAU Member Posts: 50
  • EB INDEED
    EB INDEED Member Posts: 1

    Saw this feature in roadmap, waited for it and of course it is only available in Superpower plan.. Great, as usual!

  • mjones
    mjones Member Posts: 177 ✭✭✭✭

    I am hoping that they open this to the master or lower plans.

    This is a standard\core feature on almost every other RMM out there.

  • COOLNETAU
    COOLNETAU Member Posts: 50

    I agree, however, prior to finding this, I was just doing a api call to fill the field - for me, all I had to do was to remove the stuff that puts it into the custom field. - so functionality exists - just harder to implement

  • COOLNETAU
    COOLNETAU Member Posts: 50

    So, 12 hours - is that staggered, or how is it done?

    if the device is offline? does it run it when it comes back online?

    If I manually run the script? will it fill the field with output too?

  • dragos.t
    dragos.t Internal, Support Moderator Posts: 51 admin

    Hello @COOLNETAU,

    Once every 12 hours, the script runs automatically on the device so it can update the already existing information. We don't have the exact time when this happen on our end.
    I assume that the script runs at 00:00 AM and 12:00 PM, so twice every day.
    If a device is offline and gets back online, i think it will run the script and update it. Here i am not 100% sure.

    You cannot run the script manually to update the custom field. The easier option would be for you to simply open the agent page, as this will update the information present within the custom script.