Control characters in Spectrum Event Format files causing issues with integration

book

Article ID: 143990

calendar_today

Updated On:

Products

CA Spectrum DX NetOps

Issue/Introduction

Control characters in Spectrum Event Format files causing issues with integration

Environment

Release : Any

Component : Spectrum Core / SpectroSERVER

Resolution

If running on Linux, run the "dos2unix" command on the file to convert the file from dos text to unix text format.

Use a text editor to edit the file and save it to plain ascii text.

These changes need to be done on all SpectroSERVER and OneClick systems.

After making changes to these files:

Update the event configuration on the SpectroSERVER by doing the following:

1. Log into OneClick as an ADMIN user

2. Find and select the VNM icon

3. Find and expand the SpectroSERVER Control subview in the Information tab

4. Click on the Update Event Configuration button

Update the event and alarm files in OneClick by doing the following:

1. Log into the OneClick web pages as an ADMIN user

2. Click on the Administration link

3. Click on the Update Event and Alarm Files link

4. Click on the Reload button

Additional Information

https://www.computerhope.com/unix/dos2unix.htm

Recursive conversion

Use dos2unix in combination with the find and xargs commands to recursively convert text files in a directory tree structure. For instance to convert all .txt files in the directory tree under the current directory type:

find . -name *.txt | xargs dos2unix

 

Please run the following command from the $SPECROOT/custom/Events/ directory on all Spectrum systems to convert the files from DOS text to UNIX text.:

$ for i in `find . -exec file "{}" + | grep CRLF | awk -F : '{print $1 }'`; do dos2unix $i; done

Note: The above syntax will scan and convert the files in sub-directories too (apply dos2unix recursively to all contents of a folder).

It will search for CRLF in a file (CR = Carriage Return and LF = Line Feed).

Attachments