Skip navigation
All Places > CA Service Management > Blog > 2014 > September
2014

Add trigger via web screen painter:

 

POST_VALIDATE zattach_callback_event(call_back_date) 117 FILTER(call_back_date{} && active == 1 && type == 'R');

 

 

Create multiple notification macro and notification event.

 

copy attached zattach_callback_event.spl file In \site\mods\majic folder. Do not forget to change an event ID 'evt:400034' to your ID in the script:

 

Use on your own risk

Enjoy

Hello Everyone,

 

We all have our "kit bag" of utilities to tackle Administration tasks. The list is large and long, and it is possible to specialise in these alone.

 

I'll touch on one that *I* use more than any other - a text editor for large files.

This is invaluable for reviewing that mass of data that comes out of Service Desk Manager logging. By "mass", I mean large log files, complex trace/debug logging, component logging, performance logging . . . actually, I probably don't need to explain this further, as most of you will have run headfirst into the wonderful world of SDM logs.

 

I'll be talking about Service Desk Manager, but the gist is applicable to many products.

 

My "go to" text editor is "Notepad++."

Notepad++ icon.png

There are many other text editors available, and you're free to use any of them. This one though has been serving me well in particular because:

  • Easy to use - doesn't have a steep learning curve like some editors.
  • Handles very large log files. (MS Notepad does not.)
  • Good Search functions.
  • Syntax highlighting.
  • Lots of plugins for times when base functionality doesn't cut it.
  • Active user base and community. Very popular globally. Maintained and improved.
  • Notepad++ itself lists its key features here.
  • Plain text - no unexpected special characters added.

 

Notepad++ Scenarios

 

Find all matching text strings within file/s

 

Example: Search SDM /log/stdlog.* files for "FATAL" error and see what else is near them.

 

1) From Windows Explorer, select the files you wish to view, right click and "Edit with Notepad++".

Both files will open in Notepad++.

Notepad++ opening files.png

2) Use "Cntrl F" to bring up the Find window and enter "fatal" in "Find what."

Choose "Find All in All Opened Documents" to search both documents at once.

Notepad++ Find.png

TIP: Note there is also a "Count" function available.

 

3) The results are displayed in the "Find" window at the bottom of the screen. Clicking on the line in this window will take you straight to the location in the file.

You can now begin trouble-shooting around that error - in this case a memory allocation error.

Notepad++ Fatal Find results.png


TIP: Searching ApplyPTF patches "<server name>.HIS" file for the string "PTF Wizard" will show all patches applied for CA products.

 

Find text strings within files without opening them

 

Example: An error has appeared for a user with the string "Could not fetch Event information Error." You remember that this may be recorded in a customisation, but can't recall where.

 

1) From within Notepad++, use Cntrl F and click "Find in Files."

2) Enter in the string you wish to search in "Find what" - you don't need quotes around it.

Choose the directory of your modifications. It would typically be your SDM directory/site/mods.

Note: If you know if you are searching in ".HTMPL" or ".SPL" then you may enter that in "Filters."

Choose "In all sub-folders."

Search mode is "Normal."

 

Find All will now show all files and their locations where this message is referenced.

You can just as easily search other files for other strings.

 

It is particularly useful for browser errors which give a code extract.

Again, clicking on the "Find result" line will bring up the file at the right line.

 

Notepad++ Search results find in files 2.png

PRO TIPS:

  • Powerful "regular expressions" are available here. This is a very powerful, albeit higher learning curve, way to do more complex searches. Check the internet for guides.
  • "Extended" search allows for search and replace of non-printing characters like carriage returns such as \n and \r.

 

Compare two files for differences - a crash course in "plugins."

 

Example: Service Desk Manager would not start, until the prior NX.env file was restored. Now you wish to know what is different between the old and new NX.env files.

 

1) For this, you'll need to load a plugin. Notepad++ is great for the number and quality of plugins available to achieve particular tasks.

The first time, go to the top menu Plugins, Plugins Manager, Show Plugins Manager, and choose "Compare" from the "Available" tab.

2) Open the two documents that you wish to compare.

TIP: It is best to give them distinct names. I like to work with "GOOD_" and "BAD_" so that I know which is which.

3) From Plugins, choose "Compare" and then "Compare" again.

Notepad++ Compare.png

4) Results will now be displayed, with differences marked for lines which are present in one file but not the other, or which have different text.

There is also a "Navigation" bar at the right, to show where differences lie in the overall documents.

There will be "false" readings - but at an acceptable number.

 

TIP: "Page down" moves both screens at once, which is useful. You can break this link under "View, Synchronise Vertical Scrolling."

 

Two examples of  differences are shown below. The "CANCHK" option is installed on one and not the other. And there is a different date of deinstall for an option.

Notepad++ Compare results 1.png

Moving on, there are many differences in this file, including one case of what appears to be file corruption, with a garbage character shown in the file.

As SDM reads NX.env at startup, this possibly may be sufficient to explain the difference - although further review would be required to confirm this, of course.

Notepad++ Compare results 2.png

 

Only keep the files open that you need - "Close all BUT this"

 

A quick tip, but if you open up a file, and don't need the others, you can get rid of the other tabs by right clicking the tab and choosing "Close all BUT this."

Notepad++ Close all BUT this.png

 

Go to a specific line in a file

 

Sometimes you are fortunate enough to have a browser error which lists the specific file and line where the problem is occurring. You can go straight to that line number.

Example: Error at line 325 in detail_in.htmpl. File not found.

 

Use "Cntrl G" to go to line 325 in this file. You can then see if that file exists, or check out the problem further.

 

 

TIP: The problem is not always *at* the line number given. Often it is just before, as it exits the previous section of code.

 

Use "Alt" for block text selection

 

Another quick one, but hold down the "Alt" key while dragging the mouse cursor lets you do block text selection, which is useful for pulling multiple lines of pieces of data out.

Notepad++ block selection.png

This can then be pasted eg:

2767 milliseconds

9696 milliseconds

9697 milliseconds

9697 milliseconds

 

TIP: Same functionality exists in MS Word.

 

FTP upload and download

 

This lets you connect to an FTP server to upload and download files directly from within Notepad++.

Example: Support files are at:

ftp://supportftp.ca.com/<site id>/<case number>/files_from_customer

ftp://supportftp.ca.com/<site id>/<case number>files_from_ca

 

I won't go through this example, as I honestly haven't used it (regular command prompt FTP works just fine for me, or Filezilla on special occassions).

However, it is worth noting that it is there.

Go to: Plugins, NppFTP, click on the "gear wheel" and enter in your settings.

 

Notepad++ FTP settings.png

 

 

View text files in friendly format

 

One feature that makes reading files "easy on the eyes" is the ability to flag the contents as seen by an editor. For example, use the Languages, "HTML" view to view your HTML files.

 

Notepad++ Language.png

 

"Tail" logging to see logs update in nearly real time

This is a great favourite of system administrators. The old UNIX favourite has been approximated as "Document Monitor" in Notepad++.

Have your logs scroll by on the screen, as you watch for particular messages.

 

Example: Get to a point a click before a "known problem" in the web client interface, turn on the Document Monitor, click within the web client to trigger the problem and see what is written at precisely that time.

 

First time:

1. Plugins, Plugin Manager, Show Plugin Manager and “Document Monitor” form "Available."

2. Notepad++ will prompt you to restart itself.

To activate:

3. Select Plugins and Document Monitor, "Start to monitor.” This will update the tail every three seconds.

 

TIP: Combine it with syntax highlighting - see next section - and you can have "FATAL" errors and other messages that are of interest to you highlighted in real time.

CAUTION: Some versions of Notepad++ did not handle this feature well. The earlier versions and the most recent versions are all good to my knowledge.


Syntax highlighting - using "User Defined Language" to colour code messages

 

This has changed a bit between versions (I'm writing against Notepad v6.6.7), but you can highlight key text by setting up a Document Map. This uses the same "Defined Language" as for the "friendly" view mentioned above, except that you can customise it to the issue you are facing at the time.

 

TIP: Don't go overboard with highlighting. A few key phrases are easier to handle than a rainbow.

PROTIP: Combine it with Document Monitor to track specific issues in real time.

 

But first, the "easy way" of highlighting text is simply to highlight a phrase that you're interested in on-screen, and all instances of that phrase will automatically be highlighted - no setup needed.

 

Enabling User Defined Language, AKA "coloured keywords."

1. Begin with a small document with samples of the phrases you wish to find in it. Do NOT start with your 5Gb text file, as this will lead to slow performance while you build the map.

2. Language, "Define your language." (Also available as a button at the top of screen with the lightning bolt).

3. Create New and give it a name. Eg "SDM."

4. Under "Keyword Lists" enter all of the keywords that you wish to define. Eg:

 

Group 1 - Important SDM messages. Foreground colour orange. Bold.

ERROR

 

Group 2 - Critical SDM messages. Foreground colour yellow, background red. Bold.

FATAL died SEVERE_ERROR EXIT RESTART

 

Group 3 - SDM messages of interest to a particular problem. Foreground colour bright blue. Bold.

"milliseconds to complete" "The following statement took"

 

Note that phrases must be entered in double-quotes.  I recommend "bold" for all text to make it stand out.

 

Notepad++ User Defined Language.png

 

5. Simply close the window to complete - use the "X" at the top.

6. Turn it on by Languages, and "SDM" will be right down the bottom in the User Defined section at the bottom.

 

Here is the result:

Notepad++ User Defined Language Results.png

 

One thing it doesn't do well

 

Or at least, I don't think it does. Notepad++ is excellent at searching files for text strings, but if you then want to go and search those results, the procedure is:

1) Go to Find Results pane and "Cntrl A" to select all.

2) Open a "New" tab. Paste in the results.

3) Run your second search against that. Repeat as needed.

 

You can get around this by using Regular Expressions to do something like the "NEAR" phrase, but it's more trouble than it's worth for me to remember.

If anyone has a workaround or this is updated into the product, let me know.

But really, this is a very small concern compared to the majority of the work that I do successfully with Notepad++.

 

A bunch of miscellaneous tips

 

Going to throw some together here:

  • Macros - Useful for repeated actions.  See the "Macro" menu.
  • Sessions - Use a File Save/Load Session to tag and then open up a group of files that you work on. For example, you may save NX.env, <server name>.his and web.cfg as a session called "SDM environment files."
  • View files side-by-side, instead of tabbed view. Right click the tab and either "Move" or "Clone."
  • See the "Notepad++ Cheat Sheet" at the bottom of resources for a handy list of shortcut keys grouped by function.
  • "Find and Replace" is useful.
  • There is a Tetris clone plug-in called "Falling Bricks." But it is very basic and won't improve your life. :-)

 

I hope this overview helps you to better tackle those large text files, and ease your system administration.

 

Please add comments, further text editor tips or a "Like" at top right.

 

Thanks, Kyle_R.

Hello Service Desk Manager Community!

 

Over the past couple of months I have seen some interest popping up on how to setup SSL encryption with CA Service Desk Manager. In addition to Jon Israel's excellent post here: https://communities.ca.com/message/100317861#100317861, I wanted to share with the community some information I documented on configuring SSL with SDM 12.7 on IIS 7 and Tomcat based on Go Daddy certificates.

 

Note the Go Daddy repository here if needed: Go Daddy Repository, SSL Certificate Information

 

SDM IIS / SSL / HTTP / Tomcat Configuration Tasks

 

Step one assumes that you already have a .crt file ready for use and a .key file.

 

Create a p7b file using openssl:  (filename.*** below is often named after the domain - ex. sdm.customer.com.p7b)

openssl crl2pkcs7 -nocrl -certfile filename.crt -certfile gd_bundle.crt -certfile gd_iis_intermediates.p7b -out filename.p7b
(gd_iis_intermediates.p7b and gd_bundle.crt can be obtained from the Go Daddy repository)

Create a pfx file for IIS import – Execute this from the cert location

Example: openssl pkcs12 -export -out <cert.pfx> -inkey <privatekey.key> -in <cert.crt> -certfile <gd_bundle.crt> -certfile <iisintermediate.crt>

Sample:  openssl pkcs12 -export -out sdm.customer.com.pfx -inkey sdm.customer.com.key -in sdm.customer.com.crt -certfile gd_bundle.cer -certfile gd_iis_intermediates.p7b

 

(.crt or .cer ??? --> http://www.networksolutions.com/support/what-is-the-difference-between-a-crt-and-a-cer-file/)

 

Open Server Certificates in IIS – Click Hostname Connection First on left hand side

image1-ssl.png

Double click to Open Server Certificates

image2-ssl.png


Click the Import… link on the right

image3-ssl.png

Browse for the .pfx file from your local server and then enter the cert password
(the password was specified during creation)

 

image4-ssl.png

Sample successful pfx import


Next, open up the “Sites” parent level in IIS on the left side.

Then click the “Default Web Site”

Left click on “Bindings” located on the far right side.

image5-ssl.png

image6-ssl.png
Click the ‘Add’ button to add a binding.

 

image7-ssl.png

Select type: https,   IP Address:  All Assigned,  Port 443 (default - but can be changed),   SSL Certificate – Select yours from drop down

Click: OK

 

Once the binding is complete, if you are using a loadbalancer, ensure it has already been setup for port 443 access, then restart the website IIS service.

image8-ssl.png

 

 

SET DEFAULT DOMAIN TO OPEN /CAisd/pdmweb.exe       (OPTIONAL)

Open My computer or file explorer goto the wwwroot directory (Default: C:\inetpub\wwwroot)

Create a backup of iisstart.htm

Next, open iisstart.htm in Notepad or a text editor

Select All – Delete – Then Past in the following:

<html><head>
<script>location.replace("/CAisd/pdmweb.exe");</script>
</head></html>

Save the updated iisstart.htm file

Test the url:  sample  https://environment.url

 

 

TOMCAT SSL CREATION – tomcat.keystore

As a final step, create a tomcat.keystore for use with Business Objects SSL or any tomcat based service.

Below is an example of the manual commands you could utilize:

 

cat sdm.customer.com.crt gd_intermediate.crt gd_cross_intermediate.crt valicert_class2_root.crt gd_bundle.cer gd_iis_intermediates.p7b > environment-certificate-chain.txt

openssl pkcs12 -export -inkey sdm.customer.com.key -in environment-certificate-chain.txt -out sdm.customer.com.pkcs12

../Java/jdk1.6.xx/bin/keytool -importkeystore -srckeystore sdm.customer.com.pkcs12 -srcstoretype PKCS12 -destkeystore tomcat.keystore

 

Copy the tomcat.keystore to the BO app server or wherever tomcat SSL encryption is needed.

 

 

CONFIGURE Tomcat for Repository use with SSL - tomcat.keystore

Configuring Tomcat for ssl involves updating the server.xml file for the Tomcat instance.

<Install Path>\Service Desk Manager\bopcfg\www\CATALINA_BASE\conf\server.xml

*Note, you can also do this same process for REST under: ..\CATALINA_BASE_REST\conf\server.xml (Use an alternate port number to avoid a conflict!)
***Backup the default server.xml prior to making changes!

A sample server.xml section would look like the following: (Port can be customized per your environment - but don't use 443 if IIS is configured for that port)

    <Connector SSLEnabled="true" clientAuth="false" keystoreFile="C:\filename.keystore" keystorePass="password_goes_here" maxThreads="150" port="4430" protocol="HTTP/1.1" scheme="https" secure="true" sslProtocol="TLS"/>

Restart the tomcat service from a command prompt to apply the changes. (*Note, restart all services if you think the manual tomcat restart may not have executed successfully)

pdm_tomcat_nxd -c stop
pdm_tomcat_nxd -c start

 

 

CONFIGURE Tomcat for Business Objects use with SSL - tomcat.keystore

Configuring Tomcat for BO or CABI involves updating the server.xml file for the Tomcat instance, similar to what is above.

<Connector port="8443" minSpareThreads="25" maxThreads="150" maxSpareThreads="75" maxHttpHeaderSize="8192" enableLookups="false" disableUploadTimeout="true" acceptCount="100" sslProtocol="TLS" clientAuth="false" secure="true" scheme="https" keystorePass="password_goes_here" keystoreFile="C:\filename.keystore"/>

 

One item I did not mention about server.xml is that there will be two sections for connector ports. A non-SSL config and an SSL config. If you do want SSL to be functioning, you will need a segment similar to what I have shared in this post for each server.xml file. You will also need a section similar to what is shown below that specifies a redirect port for non-SSL incoming requests:

<Connector URIEncoding="UTF-8" acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true" enableLookups="false" maxHttpHeaderSize="8192" maxSpareThreads="75" maxThreads="150" minSpareThreads="25" port="8085" redirectPort="8443"/>

*A redirectPort specification should exist in each server.xml file - along with a separate config line for the SSL connector port information.

 

 

ALTER THE REPOSITORY SETTING IN SDM

Login to the SDM environment as an Administrator

Click the Administration tab and navigate the left side menu.
Click Attachments Library – Repositories
Right click on the Service Desk repository and left click Edit.

Change the Servlet Path to reflect the full SSL address.
Ex. https://<environment custom url>:4430/CAisd/UploadServlet

 

Do the same for the Images and Knowledge repositories!!

 

image91-ssl.png

 

IF LOGOFF SESSION ISSUE SHOWS SPECIFIC ERROR

“Logging Out Of The Web Report Server…”is displayed as a pop-up and doesn't go away.

To resolve this logoff issue, do the following:

From inside ServiceDesk – Administration tab – Options Manager – Web  Report

Ensure that all 3 report options are disabled!

 

 

Thank you for checking out my first community blog post! Maybe these notes from a past SDM configuration I have performed will come in handy to someone else in the community.

If you found this information valuable, please leave a comment below. Also, if you found any errors - I'd like to know as well - Special thanks to Scott Weeks!