> For the complete documentation index, see [llms.txt](https://docs.editran.onesait.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.editran.onesait.com/documentacion-editran/ibm-editran-v5.3-ims-en/estadisticas-monitorizacion-y-alarmas/monitorizacion-de-lineas-de-comunicacion-locales.md).

# Local communication line monitoring

This functionality allows monitoring all local lines (choose which ones) of the entity, indicating how often we want to monitor them. There are several types of local lines: IP and Proxy.

To use it, follow these steps:

* Editran local environment (manual [Administration and Operation](/documentacion-editran/ibm-editran-v5.3-ims-en/operacion.md)). You must define
  * The region (ZTBEJMCO) and the monitoring transaction (ZTBM)
  * The data related to the external monitoring server, specifically: the port and the time, in seconds, that the query transaction must wait for the server to respond.
* Alarm Management. If you want to send an alarm (mail, SMS, etc.) when a line goes down or comes up, you must create a notification session in the alarm manager (6.4) with the local, remote and application codes set to nines (999999999-999999999-999999).

## Monitoring Processes <a href="#toc149821223" id="toc149821223"></a>

### Local Line Selection <a href="#toc400633707" id="toc400633707"></a>

Monitoring of local lines will begin with the creation of the monitoring file. This file will contain the resources found in the Editran profiles and may be modified by the user to indicate which of those resources must be monitored and at what schedule.

The file description is as follows:

<table data-header-hidden><thead><tr><th valign="top"></th><th valign="top"></th><th valign="top"></th><th valign="top"></th><th valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">Verify</td><td valign="top">Schedule</td><td valign="top">Interval</td><td valign="top">Line type</td><td valign="top">Line data</td><td valign="top">Update data</td></tr><tr><td valign="top"></td><td valign="top">00:00:01/00:23:59</td><td valign="top">00:10:00</td><td valign="top">X25</td><td valign="top"></td><td valign="top"></td></tr></tbody></table>

* Verify (1 byte): with an \* in this position, monitoring for the corresponding resource will be disabled.
* Schedule (17 bytes): period in which monitoring is to be performed (start time / end time)
* Interval (8 bytes): indicates how often the line test is to be performed.
* Line type (3 bytes): IP and PX.
* Line data: data obtained from the Editran profile necessary for monitoring.
* Update data: date and time of the last check and the line status. This data will be updated by the monitoring program.

The parameters are separated by hyphens.

The JCL that creates this file is ZTBEJSCO. It consists of two steps:

* In the first, the transmission sessions are traversed to obtain all local lines. The operating schedule and default test interval must be entered via SYSIN, which can be modified for each line once the file has been obtained.
* In the second step, duplicated resources are removed.

```cobol
//KI1056EI JOB (SNIM,KIT,,99),MON-INTC,MSGCLASS=H,CLASS=A,             
//             MSGLEVEL=1,NOTIFY=&SYSUID                               
//LIBPROC JCLLIB ORDER=IMSP.PROCLIB                                 
/*                                                                     
//BORRAR EXEC PGM=IEFBR14                                              
//DD1       DD DSN=KI.EGDI.ZTBEFSCO,DISP=(OLD,DELETE,DELETE)           
/*                                                                     
//INTF EXEC IMSBATCH,MBR=ZTBEESCO,PSB=ZTBPEAP1,IMSID=IMSP,REGION=6M    
//STEPLIB   DD DSN=IMSP.SDFSRESL,DISP=SHR                           
//          DD DSN=KI.EGDI.LOAD,DISP=SHR                               
//ZTBPFLIS  DD DSN=KI.EGDI.ZTBP.JCLS(ZTBPFLIS),DISP=SHR                
//ZTBEFSCO  DD DSN=&&ZTBEFSCO,DISP=(,PASS,DELETE),                     
//             UNIT=SYSDA,SPACE=(TRK,(1000,100),RLSE),                 
//             DCB=(RECFM=FB,LRECL=138)                                
//SYSOUT    DD SYSOUT=*                                                
//SYSIN     DD *                                                       
07:30:00/20:00:00-00:30:00                                             
/*                                                                     
//********************************************************************+
//** DUPLICATE ELIMINATION                                         
//********************************************************************+
//ICEMONR EXEC PGM=ICETOOL                                             
//TOOLMSG   DD SYSOUT=*                                                
//DFSMSG    DD SYSOUT=*                                                
//INDD      DD DSN=&&ZTBEFSCO,DISP=(OLD,PASS,DELETE)                   
//OUTDD     DD DSN=KI.EGDI.ZTBEFSCO,DISP=(NEW,CATLG,DELETE),           
//             VOL=SER=DES801,SPACE=(TRK,(1000,100),RLSE),             
//             DCB=(RECFM=FB,LRECL=138)                                
//TOOLIN    DD *                                                       
  SELECT FROM(INDD) TO(OUTDD) ON(34,90,CH) FIRST                       
//                                                                     
```

### Monitoring of Local Lines <a href="#toc400633708" id="toc400633708"></a>

The periodic review of communication elements is carried out by a transaction-oriented BMP program that is scheduled periodically externally. The program checks the resources according to what is indicated by the local lines file (ZTBEFSCO). It will notify the line down or activation through an alarm message with the error text.

The actions to be performed by the module for each type of network element are:

* TCP/IP connections. Connection of a socket with loopback IP address (127.0.0.1) and the listener listening port. Sending user data with a nines session and receiving the same.
  * If an error occurs when connecting or writing, possible listener down or unreachable will be indicated.
  * If an error occurs when reading or the data do not match, possible server client down will be indicated.
* PX connection. Connection of a socket to the proxy. Sending connection message x’0b’, with remote IP address and port those of the Proxy itself and user data those of a session with all-nines session code. If the same data are not received, generate error.
  * If the error occurs when connecting or writing, possible Proxy down or unreachable will be indicated.
  * If the error occurs when reading the data or they do not match, possible listener down or unreachable will be indicated.

The process that runs is ZTBEJMCO, listed below:

```cobol
//KIGE8A2I JOB (SNIM,KIT,,99),MON-RECO,MSGCLASS=H,CLASS=A,             
//             MSGLEVEL=1,NOTIFY=&SYSUID                               
//LIBPROC JCLLIB ORDER=IMSP.PROCLIB                                 
/*                                                                     
//MONRECO EXEC IMSBATCH,MBR=ZTBEEMCO,PSB=ZTBEEMCO,IMSID=IMSP,IN=ZTBM,  
//             REGION=8M                                               
//STEPLIB   DD DSN=IMSP.SDFSRESL,DISP=SHR                           
//          DD DSN=KI.EGDI.LOAD,DISP=SHR                               
//SYSTCPD   DD DSN=SW.TCPIP.SEZAPARM(TCPDATB4),DISP=SHR                
//ZTBEFSCO  DD DSN=KI.EGDI.ZTBEFSCO,DISP=OLD                           
//ZTBGFPRI  DD SYSOUT=*,DCB=(BLKSIZE=105)                              
//ZTBGFINT  DD SYSOUT=(H,INTRDR),DCB=(BLKSIZE=80)                      
//SYSOUT    DD SYSOUT=*                                                
//             
```

## Informational message format <a href="#toc14268164" id="toc14268164"></a>

### Mail messages <a href="#toc400633710" id="toc400633710"></a>

* Proxy

```
SUBJECT: EDITRAN. Line down (Proxy)                                        
EDITRAN. Line down (2006/01/13 09:38)                                     
Proxy: 10.red-193-152-56.static.ccgg.telefonica.net:7777                       
Error:ZTP246:ERROR IN CALL TO THE EZASOKET-WRITE INTERFACE - ERROR NO:00061
```

* TCP/IP

```
SUBJECT: EDITRAN. Line down (TCP)                                          
EDITRAN. Line down (2006/01/13 09:38)                                     
TCP: 172.26.130.26:7777                                                        
Error:ZTP246:ERROR IN CALL TO THE EZASOKET-WRITE INTERFACE - ERROR NO:00061    
§  Onesait Editran /Tx
SUBJECT: EDITRAN. Line down (TX)                                           
EDITRAN. Line down (2006/01/13 09:38)                                     
TX: PEPEPEPEP.PEONICA.NET:7777 NRI: 123456789012345     
```

* Line recovery

```
SUBJECT: EDITRAN. Line recovery (Proxy)                                    
EDITRAN. Line recovery (26/01/13 09:38)                                    
Proxy: 172.26.130.1:7777                                               
```

### SMS message

```
EDITRAN. Line down (2006/01/13 09:38)                                     
TCP: 172.26.130.26:7777
EDITRAN. Line down (2006/01/13 09:38)                                     
Proxy: 10.red-193-152-56.static.ccgg.telefonica.net:7777
EDITRAN. Line down (2006/01/13 09:38)                                     
TX: 172.26.130.26:7777 NRI:123456789012345
EDITRAN. Line down (2006/01/13 09:38)                                     
X25 LU:TFSIT3B0 NRI:123456789012345 TC:C0
EDITRAN. Line recovery (2006/01/13 09:38)
X25 LU:TFSIT3B0 NRI:123456789012345 TC:C0
```

### Alarm message (LOG) <a href="#toc400633712" id="toc400633712"></a>

```
24/06/09 15:51:39              ALARM LOG QUERY        EDITRAN/EA 5.3 
                                                  MNG.   <   e-mail   >     
PRESENTATION SESSION         DATE     TIME          EXT.   SMTP UNIX EXT.   SMS
999999999 999999999 999999  18-06-09  12:18:47             00   00   99       
 Line recovery. Proxy: montilla.indra.es:07778                           
999999999 999999999 999999  18-06-09  12:18:50             00   00   99       
 Line recovery. X25 LU:TFSIT3B0 NRI:3171328303 TC:B0                     
999999999 999999999 999999  18-06-09  13:04:59             00   00   99       
 Line down. X25 LU:ZTBO NRI:12345 TC:01                                  
999999999 999999999 999999  18-06-09  13:09:11             00   00   99       
 Line down. TCP: 127.0.0.1:07777                                         
999999999 999999999 999999  18-06-09  13:09:14             00   84   99       
 Line down. Proxy: montilla.indra.es:07778                               
000099980 000001230 PRTCP1  19-06-09  09:22:22                                
 PRTCP1 ERROR ABEND CODE. SEE JCL OUTPUT./CBLQDA(ON)                  
000099980 000001230 PRTCP1  19-06-09  09:23:19                                
 PRTCP1 ERROR ABEND CODE. SEE JCL OUTPUT./CBLQDA(ON)                  
999999999 999999999 999999  19-06-09  10:39:11             00   00   99       
 Line recovery. TCP: 127.0.0.1:07777                                     
999999999 999999999 999999  19-06-09  10:39:15             00   00   99       
 Line down. X25 LU:TFSIT3B0 NRI:3171328303 TC:B0                         
999999999 999999999 999999  19-06-09  10:40:51             00   00   99       
 Line recovery. Proxy: montilla.indra.es:07778                    
```

### Message in the Onesait Editran /P Log <a href="#toc400633713" id="toc400633713"></a>

```
    24/06/09              EDITRAN/P LOG QUERY                   EDITRAN   
    16:03:10              --------------------------                      5.3      
                                                                             
         SESSION          DATE   TIME                   MESSAGE               
------------------------ ----- -------- ---------------------------------------
999999999999999999999999 19-06 10:39:11 ZTP309:MONITORS. TCP. LSTNR=KIGE8A2L P
999999999999999999999999 19-06 10:39:14 ZTP309:MONITORS. PROXY. IP=192.168.015
999999999999999999999999 19-06 10:39:14 ZTP241:DETECTS FICTITIOUS LU NOT CONNECTED
999999999999999999999999 19-06 10:39:14 ZTP241:DETECTS FICTITIOUS LU NOT CONNECTED
                         19-06 10:39:15 ZTP015:RECOVERY OF FICTITIOUS LU CIRCUITS
999999999999999999999999 19-06 10:40:50 ZTP309:MONITORS. TCP. LSTNR=KIGE8A2L P
999999999999999999999999 19-06 10:40:51 ZTP309:MONITORS. PROXY. IP=192.168.015
999999999999999999999999 19-06 10:40:53 ZTP241:DETECTS FICTITIOUS LU NOT CONNECTED
999999999999999999999999 19-06 10:40:53 ZTP309:MONITORS. LU:TFSIT3B0         
999999999999999999999999 19-06 10:40:53 ZTP014:TRANSMISSION RELEASE CAUSE : 0D
999999999999999999999999 19-06 10:51:57 ZTP309:MONITORS. TCP. LSTNR=KIGE8A2L P
999999999999999999999999 19-06 10:51:59 ZTP309:MONITORS. PROXY. IP=192.168.015
999999999999999999999999 19-06 10:52:14 ZTP241:DETECTS FICTITIOUS LU NOT CONNECTED
999999999999999999999999 19-06 10:52:14 ZTP309:MONITORS. LU:TFSIT3B0         
999999999999999999999999 19-06 10:52:15 ZTP014:TRANSMISSION RELEASE CAUSE : 0D
999999999999999999999999 19-06 10:52:17 ZTP309:MONITORS. TCP. LSTNR=KIGE8A2L P
```

### Message in the Onesait Editran /P Trace <a href="#toc400633714" id="toc400633714"></a>

```
   24/06/09                 TRACE QUERY                   EDITRAN   
   16:09:22                                                          5.3      
                                                                             
s          SESSION          DATE   TIME   S CLA C  NSM         COMMENT     
-------------------------- ----- -------- - --- - ------ ----------------------
  999999999999999999999999 19-06 10:39:12 S CLO        0 CLOSES TCP CONNECTION  
  999999999999999999999999 19-06 10:39:12 E E44          MONITORS.LU:ZTBO   
  999999999999999999999999 19-06 10:39:13 S X44 1        LU DOWN:ZTBO        
  999999999999999999999999 19-06 10:39:13 E E44          MONITORS.LU:TFSIT3B0
  999999999999999999999999 19-06 10:39:13 S X44 1        LU DOWN:TFSIT3B0    
  000000000000000000000000 19-06 10:39:15 E XAI          FB 0000              
  000000000000000000000000 19-06 10:40:50 E CON        1 TCP CONNECTION INDICATION
  999999999999999999999999 19-06 10:40:50 E TAK        0 ACCEPTS TCP CONNECTION  
  999999999999999999999999 19-06 10:40:50 S CLO        0 CLOSES TCP CONNECTION  
  000000000000000000000000 19-06 10:40:51 E CON        1 TCP CONNECTION INDICATION
  999999999999999999999999 19-06 10:40:51 E TAK        0 ACCEPTS TCP CON. (PROXY)
  999999999999999999999999 19-06 10:40:51 S CLO        0 CLOSES TCP CONNECTION  
  999999999999999999999999 19-06 10:40:51 E E44          MONITORS.LU:ZTBO   
  999999999999999999999999 19-06 10:40:51 S X44 1        LU DOWN:ZTBO        
  999999999999999999999999 19-06 10:40:51 E E44          MONITORS.LU:TFSIT3B0
  999999999999999999999999 19-06 10:40:51 S XAI          0B 0000              
                                                                              
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.editran.onesait.com/documentacion-editran/ibm-editran-v5.3-ims-en/estadisticas-monitorizacion-y-alarmas/monitorizacion-de-lineas-de-comunicacion-locales.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
