RMS Task Manager: Difference between revisions

From Teltonika Networks Wiki
mNo edit summary
No edit summary
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
__TOC__
__TOC__
==Summary==
==Summary==
RMS '''Task Manager''' is a remote scripting tool with a user friendly graphics interface integrated into RMS platform. It is located in the '''Management''' top control menu found under '''[[RMS Devices|Devices]]''' section.  
RMS '''Task Manager''' is a remote scripting tool with a user friendly graphics interface integrated into RMS platform. It is located in the '''[[RMS Management|Management]]''' section.  
 
[[File:RMS manual task manager location v1.png|border|class=tlt-border]]


[[File:RMS manual task manager location v1.png]]


===Introduction===
===Introduction===
Line 11: Line 12:
This article will provide information on what is needed in order to start using '''RMS Task Manager''' as well as configuration examples with step-by-step instructions for different usage scenarios.
This article will provide information on what is needed in order to start using '''RMS Task Manager''' as well as configuration examples with step-by-step instructions for different usage scenarios.


===Two-Factor Authentication===
==Overview==
----
[[File:RMS manual Task manager configuration menu v1.png|border|class=tlt-border|1100px]]
Firstly, before using Task Manager, your account must have [[Teltonika ID|Two-Factor Authentication]] enabled.
In the main Task Manager page, you'll be able to:
 
#Create a new task group or view files that have been created/imported during task execution.
This can be done by navigating to your RMS Account settings and then the Security page. Any Authentication type (other than None) is viable.
#Search through existing task groups.
 
#Edit or remove task group
Once Two-Factor authentication is enabled, you can head over to Devices → Management → Task Manager and start creating new task groups.
#Change table settings or refresh data.


==Creating a new Task Group==
==Creating a new Task Group==
New task group can be created by clicking on the '''"ADD NEW TASK GROUP"''' button inside Task Manager configuration menu.
New task group can be created by clicking on the <big>'''<span style="color:#0455a4">+ ADD</span>'''</big> button inside Task Manager configuration menu, which will open this window:
 
[[File:RMS manual new task group v1.png|1100px|border|class=tlt-border]]
[[File:RMS manual Task manager configuration menu v1.png]]
 
On a new task group window, settings of this task group and its tasks can be edited:
On a new task group window, settings of this task group and its tasks can be edited:
*'''Task group name''' - it is a name of your entire Task group
#'''Task group name''' - it is a name of your entire Task group
**'''Task name''' - this field names one of your tasks inside this specific task group
#'''Task name''' - this field names one of your tasks inside this specific task group
**'''Task type''' - select one type from the drop down menu for this specific task
#'''Task type''' - select one type from the drop down menu for this specific task
***'''Command'''[[File:RMS manual new task group v1.png|right|581x581px|alt=|border]]
##'''Upload file'''
****'''Command variables''' - when set, value of the key can be changed during the execution of the task group. Press the "+" button to create a new variable
###'''File to upload''' - select file to be uploaded to the device
*****'''Key''' - variable key to be written into the command
###'''Target file path''' - location of where this file should be uploaded
*****'''Value''' - default value of the key
##'''Download file'''
*****'''Description''' - this is an optional field, can be used to clarify the purpose of the variable
###'''File path in device''' - location of the file in the device to be downloaded
****'''Command''' - command that needs to be executed on the device
#'''Command'''
****'''Timeout(seconds)''' - set a time limit of how long the task is allowed to take before timeout
##'''Command variables''' - when set, value of the key can be changed during the execution of the task group. Press the "+" button to create a new variable
****'''Acceptable codes''' - add return codes that are accepted as 'non failure', which means the task will count as completed without fail
##'''Key''' - variable key to be written into the command
****'''Stop task group on failure''' - if the box is unchecked, next task will be executed even if the current one fails
##'''Value''' - default value of the key
***'''Upload file'''
##'''Description''' - this is an optional field, can be used to clarify the purpose of the variable
****'''File to upload''' - select file to be uploaded to the device
#'''Command''' - command that needs to be executed on the device
****'''Target file path''' - location of where this file should be uploaded
#'''Timeout(seconds)''' - set a time limit of how long the task is allowed to take before timeout
****'''Stop task group on failure''' - if the box is unchecked, next task will be executed even if the current one fails
#'''Acceptable codes''' - add return codes that are accepted as 'non failure', which means the task will count as completed without fail
***'''Download file'''
#'''Stop task group on failure''' - if the box is unchecked, next task will be executed even if the current one fails
****'''File path in device''' - location of the file in the device to be downloaded
#'''Add additional task +''' - used to add another task to this specific task group
****'''Stop task group on failure''' - if the box is unchecked, next task will be executed even if the current one fails
#Save task group
*'''Add additional task +''' - used to add another task to this specific task group
#In this section all tasks in the task group will be displayed.


==Executing Task Groups==
==Executing Task Groups==
Once task groups are created, they will appear inside Task Manager configuration window like so:
Once task groups are created, you can execute them on selected devices.


[[File:RMS manual task group list v1.png|border]]
After selecting them, in the top menu, under '''Management''', click on '''Execute task'''.


To execute a task group, devices on which this task group needs to be executed on must be selected by checking the boxes in your device list.
[[File:RMS manual task group list v1.png|border|class=tlt-border]]


'''Note:''' Only devices that are online at the moment can be selected.
'''Note:''' Only devices that are online at the moment can be selected.
Line 57: Line 56:
Once devices are selected, access the task manager configuration menu shown in the image above (''Devices → Management → Task Manager''), once again check the boxes of the devices on which task group needs to be executed and press '''"Execute task group for selected devices"''' button in the Actions column. A new window will open where information of the task group can be reviewed before pressing '''"Execute Task Group"''' button.
Once devices are selected, access the task manager configuration menu shown in the image above (''Devices → Management → Task Manager''), once again check the boxes of the devices on which task group needs to be executed and press '''"Execute task group for selected devices"''' button in the Actions column. A new window will open where information of the task group can be reviewed before pressing '''"Execute Task Group"''' button.


[[File:RMS manual executing task group v1.png]]
# Here, devices selected on which desired task group will be executed, are displayed.
# Here, you can select which task group to execute.
# Confirm, that you want to execute this task group.
 
[[File:RMS manual executing task group v1.png|border|class=tlt-border|1100px]]
 
Once the task group finishes executing tasks, a status message will be shown whether the task group finished with all tasks completed:
 
[[File:Rmstaskmanager1.png|border|class=tlt-border|300px]]
 


Once the task group finishes executing tasks, a status message will be shown whether the task group finished with all tasks completed.


==Editing Task Groups==
==Editing Task Groups==
Task groups can be edited by clicking '''"Edit group tasks"''' button, which is located in the Task manager configuration menu Actions column:
Task groups can be edited by clicking '''"Edit group tasks"''' button, which is located in the Task manager's main page:


[[File:RMS manual Task manager deleting tasks v1.png]]
[[File:RMS manual Task manager deleting tasks v1.png|border|class=tlt-border|300px]]


==Deleting Task Groups ==
Task groups can be deleted by clicking '''"Remove group"''' button, which is located in the Task manager configuration menu Actions column:


==Deleting Task Groups==
Task groups can be deleted by clicking '''"Remove group"''' button, which is located in the Task manager's main page:
[[File:RMS manual Task manager removing tasks v1.png|border|class=tlt-border|300px]]


[[File:RMS manual Task manager removing tasks v1.png]]


==Configuration Examples==
==Configuration Examples==


=== Setting Mobile Data Limit ===
===Setting Mobile Data Limit===
----
----
In this example, we will set mobile data limit on SIM1 interface. We will achieve this by creating new Task group in RMS Task Manager and using Command as a task type.
In this example, we will set mobile data limit on SIM1 interface. We will achieve this by creating new Task group in RMS Task Manager and using Command as a task type.


*Create a new task group by clicking '<nowiki/>'''ADD NEW TASK GROUP'''' button inside Task Manager configuration window.
*Create a new task group by clicking ''''ADD NEW TASK GROUP'''' button inside Task Manager configuration window.
*Define Task group name, select Command as a task type on the first task and insert the following text into Command field:
*Define Task group name, select Command as a task type on the first task and insert the following text into Command field:
''uci set quota_limit.mob1s1a1.enabled='1'''
''uci set quota_limit.mob1s1a1.enabled='1'''
*Click '<nowiki/>'''ADD ADDITIONAL TASK'''' button at<nowiki/> the bottom of the window to add a second task, make settings identical to the first task and insert the following command into the Command field (this will set the mobile limit to 2GB or 2048MB):
*Click '''<nowiki/>''''<nowiki/>'''ADD ADDITIONAL TASK'''' button at<nowiki/> the bottom of the window to add a second task, make settings identical to the first task and insert the following command into the Command field (this will set the mobile limit to 2GB or 2048MB):
''uci set quota_limit.mob1s1a1.data_limit='2048'''
''uci set quota_limit.mob1s1a1.data_limit='2048'''
*Add another task with identical setti<nowiki/>ngs and insert the following text into the Command field (this will set the period of the data limit to 1 day:
*Add another task with identical setti<nowiki/>ngs and insert the following text into the Command field (this will set the period of the data limit to 1 day:
''uci set quota_limit.mob1s1a1.period='1'''
''uci set quota_limit.mob1s1a1.period='1'''
*Add another task with identical setti<nowiki/>ngs and insert the following text into the Command field (this will commit the changes and restart the mobile interface):
*Add another task with identical setti<nowiki/>ngs and insert the following text into the Command field (this will commit the changes and restart the mobile interface):
''uci commit && ifdown mob1s1a1 && ifup mob1s1a1''
''uci commit && ifdown mob1s1a1 && ifup mob1s1a1''




Here is a review of all 4 tasks in this task group:
Here is a review of all 4 tasks in this task group:


[[File:RMS manual Task manager configuration example data limit v1.png|border|523x523px]]
[[File:RMS manual Task manager configuration example data limit v1.png|border|1100px]]
 


===Installing Additional Packages===
===Installing Additional Packages===
----
----
In this example, we will install an additional package to the device using opkg commands as well as generate and download a log file to see if package was installed successfully. For this example, we will install DNP3 package.
In this example, we will install an additional package to the device using opkg commands as well as generate and download a log file to see if package was installed successfully. For this example, we will install DNP3 package.
*Create a new task group by clicking '<nowiki/>'''ADD NEW TASK GROUP'''' button inside Task Manager configuration window.
*Create a new task group by clicking '''<nowiki/>''''<nowiki/>'''ADD NEW TASK GROUP'''' button inside Task Manager configuration window.
* Define Task group name, select Command as a task type on the first task and insert the following text into Command field:
* Define Task group name, select Command as a task type on the first task and insert the following text into Command field:
''opkg update''
''opkg update''
*Set Timeout to 30 seconds, since updating package repository might take longer than the default 10 seconds.
*Set Timeout to 30 seconds, since updating package repository might take longer than the default 10 seconds.
*Add "1" to acceptable codes, since while updating repositories, some links might be unavailable, this is done to avoid getting an error message while executing a task. Alternatively, you can uncheck "Stop task group on failure" box to achieve the same result.
* Add "1" to acceptable codes, since while updating repositories, some links might be unavailable, this is done to avoid getting an error message while executing a task. Alternatively, you can uncheck "Stop task group on failure" box to achieve the same result.
*Configuration of the first task should look like the following image:
*Configuration of the first task should look like the following image:
[[File:RMS manual Task manager configuration example package v1.png]]
[[File:RMS manual Task manager configuration example package v1.png|border|class=tlt-border]]


*Click '''ADD ADDITIONAL TASK''' button at the bottom of the window to add a second task, once again select Command as a task type and insert the following text into command field:
*Click '''ADD ADDITIONAL TASK''' button at the bottom of the window to add a second task, once again select Command as a task type and insert the following text into command field:
''opkg install dnp3 >> /tmp/opkglog.log''
''opkg install dnp3 >> /tmp/opkglog.log''
*This will install the package as well as save the installation logs to the defined log file.
*This will install the package as well as save the installation logs to the defined log file.
*Set the timeout to 30 seconds, since the installation process can take longer than the default 10 seconds.
*Set the timeout to 30 seconds, since the installation process can take longer than the default 10 seconds.
*Second task configuration should look like the following image:
*Second task configuration should look like the following image:
[[File:RMS manual Task manager configuration example package task2 v1.png]]
[[File:RMS manual Task manager configuration example package task2 v1.png|border|class=tlt-border]]
*Now we will download the generated log file to read the logs of installation.
*Now we will download the generated log file to read the logs of installation.
*Click '''ADD ADDITIONAL TASK''' button at the bottom of the window to add a second task, this time, select Download file as a task type and inser the following path to the '''File path in device''' field:
*Click '''ADD ADDITIONAL TASK''' button at the bottom of the window to add a second task, this time, select Download file as a task type and inser the following path to the '''File path in device''' field:
''/tmp/opkglog.log''
''/tmp/opkglog.log''
*Configuration of the third task should look like the following image:
*Configuration of the third task should look like the following image:
[[File:RMS manual Task manager configuration example package task3 v1.png]]
[[File:RMS manual Task manager configuration example package task3 v1.png|border|class=tlt-border]]


'''Note:''' Downloaded files can be found by navigating to '''''Management → Files'''''
'''Note:''' Downloaded files can be found by navigating to '''''Management → Files'''''
[[Category:RMS_Management]]

Latest revision as of 12:16, 21 March 2023

Main Page > IoT Platforms > RMS > RMS Manual > RMS Management > RMS Task Manager

Summary

RMS Task Manager is a remote scripting tool with a user friendly graphics interface integrated into RMS platform. It is located in the Management section.


Introduction


Using Task Manager allows users to create Task Groups which can be executed on demand and for as many devices simultaneously as required. Task groups allows us to automate the process of downloading/uploading/executing. Each task group can consist of a lot of smaller tasks with different types, timeout intervals and acceptable return code configurations.

This article will provide information on what is needed in order to start using RMS Task Manager as well as configuration examples with step-by-step instructions for different usage scenarios.

Overview

In the main Task Manager page, you'll be able to:

  1. Create a new task group or view files that have been created/imported during task execution.
  2. Search through existing task groups.
  3. Edit or remove task group
  4. Change table settings or refresh data.

Creating a new Task Group

New task group can be created by clicking on the + ADD button inside Task Manager configuration menu, which will open this window: On a new task group window, settings of this task group and its tasks can be edited:

  1. Task group name - it is a name of your entire Task group
  2. Task name - this field names one of your tasks inside this specific task group
  3. Task type - select one type from the drop down menu for this specific task
    1. Upload file
      1. File to upload - select file to be uploaded to the device
      2. Target file path - location of where this file should be uploaded
    2. Download file
      1. File path in device - location of the file in the device to be downloaded
  4. Command
    1. Command variables - when set, value of the key can be changed during the execution of the task group. Press the "+" button to create a new variable
    2. Key - variable key to be written into the command
    3. Value - default value of the key
    4. Description - this is an optional field, can be used to clarify the purpose of the variable
  5. Command - command that needs to be executed on the device
  6. Timeout(seconds) - set a time limit of how long the task is allowed to take before timeout
  7. Acceptable codes - add return codes that are accepted as 'non failure', which means the task will count as completed without fail
  8. Stop task group on failure - if the box is unchecked, next task will be executed even if the current one fails
  9. Add additional task + - used to add another task to this specific task group
  10. Save task group
  11. In this section all tasks in the task group will be displayed.

Executing Task Groups

Once task groups are created, you can execute them on selected devices.

After selecting them, in the top menu, under Management, click on Execute task.

Note: Only devices that are online at the moment can be selected.

Once devices are selected, access the task manager configuration menu shown in the image above (Devices → Management → Task Manager), once again check the boxes of the devices on which task group needs to be executed and press "Execute task group for selected devices" button in the Actions column. A new window will open where information of the task group can be reviewed before pressing "Execute Task Group" button.

  1. Here, devices selected on which desired task group will be executed, are displayed.
  2. Here, you can select which task group to execute.
  3. Confirm, that you want to execute this task group.

Once the task group finishes executing tasks, a status message will be shown whether the task group finished with all tasks completed:


Editing Task Groups

Task groups can be edited by clicking "Edit group tasks" button, which is located in the Task manager's main page:


Deleting Task Groups

Task groups can be deleted by clicking "Remove group" button, which is located in the Task manager's main page:



Configuration Examples

Setting Mobile Data Limit


In this example, we will set mobile data limit on SIM1 interface. We will achieve this by creating new Task group in RMS Task Manager and using Command as a task type.

  • Create a new task group by clicking 'ADD NEW TASK GROUP' button inside Task Manager configuration window.
  • Define Task group name, select Command as a task type on the first task and insert the following text into Command field:
uci set quota_limit.mob1s1a1.enabled='1'
  • Click 'ADD ADDITIONAL TASK' button at the bottom of the window to add a second task, make settings identical to the first task and insert the following command into the Command field (this will set the mobile limit to 2GB or 2048MB):
uci set quota_limit.mob1s1a1.data_limit='2048'
  • Add another task with identical settings and insert the following text into the Command field (this will set the period of the data limit to 1 day:
uci set quota_limit.mob1s1a1.period='1'
  • Add another task with identical settings and insert the following text into the Command field (this will commit the changes and restart the mobile interface):
uci commit && ifdown mob1s1a1 && ifup mob1s1a1


Here is a review of all 4 tasks in this task group:


Installing Additional Packages


In this example, we will install an additional package to the device using opkg commands as well as generate and download a log file to see if package was installed successfully. For this example, we will install DNP3 package.

  • Create a new task group by clicking 'ADD NEW TASK GROUP' button inside Task Manager configuration window.
  • Define Task group name, select Command as a task type on the first task and insert the following text into Command field:
opkg update
  • Set Timeout to 30 seconds, since updating package repository might take longer than the default 10 seconds.
  • Add "1" to acceptable codes, since while updating repositories, some links might be unavailable, this is done to avoid getting an error message while executing a task. Alternatively, you can uncheck "Stop task group on failure" box to achieve the same result.
  • Configuration of the first task should look like the following image:

  • Click ADD ADDITIONAL TASK button at the bottom of the window to add a second task, once again select Command as a task type and insert the following text into command field:
opkg install dnp3 >> /tmp/opkglog.log
  • This will install the package as well as save the installation logs to the defined log file.
  • Set the timeout to 30 seconds, since the installation process can take longer than the default 10 seconds.
  • Second task configuration should look like the following image:

  • Now we will download the generated log file to read the logs of installation.
  • Click ADD ADDITIONAL TASK button at the bottom of the window to add a second task, this time, select Download file as a task type and inser the following path to the File path in device field:

/tmp/opkglog.log

  • Configuration of the third task should look like the following image:

Note: Downloaded files can be found by navigating to Management → Files