Skip to content

Commit a81b541

Browse files
authored
Create README.md
Readme docs about the script used to retrieve the agent log file on demand from the mid server
1 parent 702d7d7 commit a81b541

File tree

1 file changed

+28
-0
lines changed
  • Server-Side Components/Background Scripts/Get Agent log from Mid Server

1 file changed

+28
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# ServiceNow MID Server Log Retrieval
2+
3+
This script is used to grab a agent log file from a specified **MID Server** on demand.
4+
5+
## What Does It Do?
6+
7+
It sends a command through the **ECC Queue** to the MID Server, asking it to locate a file (like `agent0.log.0`) and send its contents back to the ServiceNow instance.
8+
9+
---
10+
11+
## How to Use the Function
12+
13+
The function is named `getMidServerAgentLog`.
14+
15+
| Parameter | What it is | Example Value |
16+
| :--- | :--- | :--- |
17+
| **`midServerName`** | The name of your MID Server. | `"DevMidServer01"` |
18+
| **`logFileName`** | The name of the file you want. | `"agent0.log.0"` |
19+
20+
### Quick Example:
21+
22+
```javascript
23+
// Change "YOUR_MID_SERVER" to the actual name!
24+
var mid = "YOUR_MID_SERVER";
25+
var log = "agent0.log.0";
26+
27+
getMidServerAgentLog(mid, log);
28+
// This creates the request in the ECC Queue.

0 commit comments

Comments
 (0)