[GH-ISSUE #568] BUG: Checks not passing value properly #361

Closed
opened 2026-03-02 02:15:47 +03:00 by kerem · 3 comments
Owner

Originally created by @ghosty212 on GitHub (Jun 11, 2021).
Original GitHub issue: https://github.com/amidaware/tacticalrmm/issues/568

Originally assigned to: @wh1te909 on GitHub.

Server Info (please complete the following information):

  • OS: Ubuntu 20.04
  • Browser: chrome
  • RMM Version (as shown in top left of web UI): 0.6.13

Installation Method:

  • [X ] Standard

Agent Info (please complete the following information):

  • Agent version (as shown in the 'Summary' tab of the agent from web UI): 1.5.7
  • Agent OS: Windows 10 Pro, 64 bit v2009 (build 19042.1052)

Describe the bug
Script Variables cannot be used in script checks. Using {{agent.name}} or {{site.name}} in a script check leads to the variable being {agent.name} or {site.name} instead of the actual agent.name or site.name. Same for custom fields.

To Reproduce
Steps to reproduce the behavior:
1.

# Test-CustomField.ps1

param (
   [string] $ClientName,
)

Write-Output "Client: $ClientName"
  1. add Test-CustomField.ps1 as script check with variable ( -ClientName {{client.name}} )
  2. run check
  3. see that output is: Client: {client.name}

Expected behavior
Output should be the actual value of client.name. Like it is when running the script via "run script" or as automated task.

Additional context
there was a similiar bug with automated tasks before and fixed in #514

Originally created by @ghosty212 on GitHub (Jun 11, 2021). Original GitHub issue: https://github.com/amidaware/tacticalrmm/issues/568 Originally assigned to: @wh1te909 on GitHub. **Server Info (please complete the following information):** - OS: Ubuntu 20.04 - Browser: chrome - RMM Version (as shown in top left of web UI): 0.6.13 **Installation Method:** - [X ] Standard **Agent Info (please complete the following information):** - Agent version (as shown in the 'Summary' tab of the agent from web UI): 1.5.7 - Agent OS: Windows 10 Pro, 64 bit v2009 (build 19042.1052) **Describe the bug** Script Variables cannot be used in script checks. Using {{agent.name}} or {{site.name}} in a script check leads to the variable being {agent.name} or {site.name} instead of the actual agent.name or site.name. Same for custom fields. **To Reproduce** Steps to reproduce the behavior: 1. ``` # Test-CustomField.ps1 param ( [string] $ClientName, ) Write-Output "Client: $ClientName" ``` 2. add Test-CustomField.ps1 as script check with variable ( -ClientName {{client.name}} ) 3. run check 4. see that output is: `Client: {client.name}` **Expected behavior** Output should be the actual value of client.name. Like it is when running the script via "run script" or as automated task. **Additional context** there was a similiar bug with automated tasks before and fixed in #514
kerem 2026-03-02 02:15:47 +03:00
  • closed this issue
  • added the
    bug
    fixed
    labels
Author
Owner

@wh1te909 commented on GitHub (Jun 12, 2021):

thanks for finding this, fixed and will be in next release

<!-- gh-comment-id:860099739 --> @wh1te909 commented on GitHub (Jun 12, 2021): thanks for finding this, fixed and will be in next release
Author
Owner

@wh1te909 commented on GitHub (Jun 12, 2021):

released in 0.6.15

<!-- gh-comment-id:860106234 --> @wh1te909 commented on GitHub (Jun 12, 2021): released in 0.6.15
Author
Owner

@cm-slu commented on GitHub (Jun 13, 2021):

I just tested it works.
Thanks the team.

<!-- gh-comment-id:860171704 --> @cm-slu commented on GitHub (Jun 13, 2021): I just tested it works. Thanks the team.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/tacticalrmm#361
No description provided.