Prompt actions in NCM Device Templates
Site24x7's Network configuration manager (NCM) feature automatically takes device configuration backups without manual intervention. NCM Device Templates define the commands to periodically connect, back up, restore, or perform other configuration-related operations on a device. To perform these operations, the On-Premise Poller connects to the device using protocols like SSH, SSH-SCP, SSH-TFTP, TELNET, and TELNET-TFTP.
However, while backing up device configurations, some commands on the terminal may require additional user input (or confirmation). It could be the tap of an enter button or a yes/no response, without which the configuration backup won't proceed any further.
So you need to define the action to be performed for commands that require user input along with the backup command on the appropriate NCM Device Template. This is called a Prompt Action and can be set for each command, if required. You can set a Prompt Action on the NCM Device Templates page by editing the appropriate device template.
Learning about Prompt Actions
Let us consider an example given in Figure 1. Here, after question "Do you wish to proceed (y or n)?:", an answer needs to be provided ("y" to proceed further). The action following the prompt ")?" needs to be defined so that the operational flow in NCM can continue unhindered.
Prompts and their corresponding Action IDs
Here's a list of Prompts and the corresponding Prompt Action IDs to help you get started. However, if you cannot find a relevant action ID for your prompt, please get in touch with us at support@site24x7.com to add the values.
Serial Number |
Prompt |
Prompt ID |
Command |
1 |
[confirm] |
yesActionId ImageDownloadPromptAction1 ImageDownloadPromptAction2 scriptExecutionActionId |
LF |
2 |
[yes/no] |
yesActionId ImageDownloadPromptActioni2 scriptExecutionActionId |
yes followed by LF |
3 |
y/n |
yesActionId |
y |
scriptExecutionActionId AlaxalaActionId BrocadeActionId |
y followed by LF |
||
Alaxala1230ActionId hitachiActionId |
y followed by CR and LF
|
||
4 |
yes/no |
yesActionId scriptExecutionActionId |
yes followed by LF |
5 |
[y/n] |
hpActionId |
y |
6 |
[y/n] |
RadwareActionId |
n followed by LF |
7 |
(y/n) |
HirschmannSwitchActionId DellActionId |
y followed by LF |
8 |
[Y/N] |
H3CSwitchActionId |
Y followed by LF |
9 |
[Y/N] |
3comActionId |
y followed by CR and LF |
10 |
(y/N) |
CiscoWLANControllerActionId |
y followed by LF |
11 |
(y/n) ? |
nortel8600ActionId |
y followed by LF |
12 |
(y/n) [n]? |
catOSActionId |
y followed by LF |
13 |
(yes,no) [no] : |
3comActionId |
yes followed by CR and LF |
14 |
?[Yes |
dlinkActionId scriptExecutionActionId |
y(y) |
15 |
(YES): |
packerShaperActionId |
yes followed by CR and LF |
16 |
[Y]> |
IronportId |
y followed by LF |
17 |
No]): |
necActionId |
y followed by CR and LF |
18 |
[y] |
FiberhomeId |
y |
19 |
]? |
scriptExecutionActionId EnterasysActionId |
LF y followed by LF |
20 |
continue |
hpActionId scriptExecutionActionId |
LF |
21 |
Continue -> |
CiscoVPNConcentratorActionId |
q (q) |
22 |
continue.... |
CiscoWLANControllerActionId |
LF |
23 |
continue |
nortelPPActionId RadwareActionId |
$32 (hex Value) |
24 |
All |
dlinkActionId |
a (a) |
25 |
Allllaa |
scriptExecutionActionId |
|
26 |
completed |
yesActionId |
LF |
27 |
done. |
foundryActionId scriptExecutionActionId |
CR and LF |
28 |
Done. |
H3CSwitchActionId |
LF |
29 |
OK |
TransPortWirelessrouterId |
CR and LF |
30 |
--More-- |
yesActionId foundryActionId nortelPPActionId EnterasysActionId CiscoWLANControllerActionId NortelContivityActionId RadwareActionId scriptExecutionActionId |
Blank Space ($32) as a hexadecimal value |
31 |
-- More -- |
yesActionId scriptExecutionActionId |
|
32 |
---(more)--- |
yesActionId scriptExecutionActionId |
|
33 |
--- more --- |
yesActionId netscreenActionId scriptExecutionActionId |
|
34 |
---MORE--- |
yesActionId |
|
35 |
---more--- |
yesActionId |
|
36 |
-- MORE -- |
hpActionId scriptExecutionActionId CanogaPerkinsActionId |
|
37 |
----More |
scriptExecutionActionId |
|
38 |
next line : |
hpActionId scriptExecutionActionId |
|
39 |
notes: |
3comActionId |
Configuration backed up by NCM followed by CR and LF |
40 |
TFTP Server: |
hpActionId |
LF |
41 |
Press any key to continue |
AlaxalaActionId AlaxalaActionId Alaxala1230ActionId scriptExecutionActionId |
CR and space |
42 |
enter key): |
H3CSwitchActionId |
LF |
43 |
[Yes/ press any key for no].... |
DellActionId |
y followed by LF |
44 |
File uploaded successfully |
H3CSwitchActionId |
LF |
45 |
saved configuration successfully |
H3CSwitchActionId |
LF |
46 |
byte |
AlaxalaActionId scriptExecutionActionId |
LF |