cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements

Community Helping Community

BLOG (No Title)

3858
Views
5
Helpful
0
Comments
Cisco Employee

A kind weekly welcome to all those out in TEO land! The first week's blog is off to a great success and I look forward to continuing this on a weekly basis (I hope).

A major question we face on a weekly basis is how do you start process authoring? What are the steps? What are the best practices? What are the limitations? It is my hope to attack some of those things in this week's blog entry.

Shaun's Thoughts:

     So we all know my thoughts on setting up your process on paper. (see last week's blog) But then what do we do after that? I find it best to break my thoughts and processes up into smaller components. This makes the testing and validation of those components much easier.  Why write an entire process if I cannot get a simple "LS" to work in an SSH activity? Let's take a make believe example and work through it:

Scenario: You need to monitor a web site or location that you can ping. You will want to raise an alert when the ping is high and reboot the server to fix it. (assuming that this reboot is a fix). You also want to track the pings and see when peek hours are, etc

First, we will not do the flow chart here, that's more of a pencil and paper thing. We need input on the location to use, and we need to know what the threshold for ping will be. We will also need to know a contact to make aware of the situation.

We know we'll need URL Ping (from the core adapter), probably need some task stuff (from core adapter), and be able to dump things to a database. Good thing we have the TEOReporting database ready to use!

Second, we need to create our targets, in this case it will be a Windows Server, I'll call mine "Yahoo Server". This will be the target that needs to be rebooted. Now reboot may be a bit much so whatever corrective action you could think of, but we're trying to be simple here.

Next, we need to use some global variables. It is best practice, in my eyes, to use Global Variables for thresholds and configuration type settings. *NOT FOR VARIABLE STORAGE* . If you wish to store something off in a temporary type database, definition variables are a better bet in my eyes.

For this case I'll have 3 globals:

1)  A monitor e-mail that alerts a person when there is an issue

2) A ping threshold - How high is the ping before we have an issue?

3) A site name table where we configure two columns (both strings) - one with the name of the URL to ping, one with the name of the Target associated to that URL

Globals.JPG

So now we need to write the process and get the output and monitoring we are looking for. Here is the finished product, we will take apart each piece below:

completeBlog2.JPG

So that was just so easy, right? Just kidding. So to start we need to be able to cycle through all the URLS in our *TABLE*. To do this we go under the logic tab and use a "For Each Block", which allows us to feed it a table and then it will proceed through all the rows in the table. This is very useful for many applications, especially SAP where much of the returned information is in table format.

A quick note on inserting reference variables(which is what you are doing) is that you click on the "#" icon and pull up a pop-up menu that gives you access to reference variables inside of TEO. You can access those in the process (variables, configuration items, etc) , Global Variables, Adapters, and workflow (activities that would have already run at that point). We will assume you have done this before, if not, please refer to the TEO documentation or look at the TAP for this example for further viewing.

Ok, so we are going to loop through the table, great, however as with many For-Each type loops, if you want to do more than 1 activity you need a begin/end, so we drop in a "Sequential Block" and that allows us to put as many activities as we want in it. Not too hard so far. Next we drop in the URL Ping activity which is the meat behind this process. Or the URL tab we need to give it the URL, but it could be one of many in the table. So what do we do?? We need to reference the Workflow.For Each Block.Item.URL:

irv.JPG

Great! Now we need to put in a conditional block to determine whether we have an issue or not. You should see two conditional branches with that. If you click in the conditional branch you will see "condition" area and a button you can click next to it. Clicking that brings up the condition dialog. You want to do a new->variable condition and then put the variable as the returned URL response time or WORKFLOW.URL PING. RESPONSE TIME and then do a comparison to the threshold. (or GLOBAL VARIABLES.BLOG 2 PING THRESHOLD). Obviously I could do a ton of screen shots here but we'll leave it off so this blog does not go on forever!

Lastly, we need to configure each branch and what happens in each one. On the "Does not exceed" or "NO" side, we can put the "Publish Metric" to publish the data to our TEOReporting database. (and thusly look when peek times are) On the "Exceeds" or "YES" branch we need to follow the ITIL standard and raise an Alert followed by an Incident. We can use the "Restart Server" activity to reboot the system and then use the "E-mail" activity to send an e-mail to the user. Lastly we need to setup a schedule for this to run on, say every 5 minutes. In the process properties, we can go to the Trigger section and create a new schedule. Set it to run 288 times in one day and every 5 minutes and there you go. (you must divide the day up into equal intervals for your schedule. Say you want to run it every hour, you'd do 24 time/day)

Pretty easy, right? If you are still totally confused, see the tap referenced below.

Shaun's Weekly Tip - Alerts *AND* Incidents, why?

     In the ITIL standard we should raise alerts then incidents and people should get Incidents. I find the best way to handle this is to do all your configuration in the alert and then just (using reference variables) copy all that information to the incident. Cuts your configuration time in almost half.

Shaun's Weekly Q/A

From last week's blog:

Comment of the week goes to Bill Disch of General Mills for this first question.

Q: Do you have a suggestion for listing processes with "Archiving on" instead of looking at each process in the edit mode?

A: You need to run a SQL query on your database. This query will show all with persistence on:

select

* from dbo.Configuration whereConfigurationData.value('(ProcessConfiguration/StoreWhenCompleted)[1]','nvarchar(max)') = 'true';

Q: Best practices for using automation packs across multi system environments?

A: My thoughts are to create automation packs for each major component(targets, globals, etc) and make it easier to manage on yourself. Then export from maybe one dev environment into your production environments. Currently there is no "CLI" or automated process to export/import.

Q: Is there any way to quickly configure/change what server you connect to in the remote UI?

A: As of 2.1.2 no, there will be some changes in 2.2 that might help with this.

Ever week I will pick a handful of questions from you, the reading TEO public, to answer in this part of the blog. They can come from comments posted below or via an inbox I have setup at teo-blog-questions@external.cisco.com

The e-mail inbox will not be responded to and is not a place to send bug/issue questions, more of a place to send quick hitter type questions or thoughts about the week's blog post. The most insightful/best e-mail/comment will win "Comment of the Week" honors for the following week's blog post.

Please also let me know if you like the format of this blog and what else you would like to see/know about. Feel free to give any ideas as to future blog posts, etc and I will be happy to post them. I hope to do more how-tos, best practices, tips, tricks, and hopefully some interviews of the important people behind the scenes of TEO. My hope is to have a once/week blog entry here on TEO!

WEEKLY TEO BLOG DISCLAIMER: As always, this is a blog and my (Shaun Roberts) thoughts on TEO, my thoughts on best practices, and my experiences with the product and customers. The above views are in no way representative of Cisco or any of it's partners, etc. None of these views, etc are supported and this is not a place to find standard product support. If you need standard product support please do so via the current call in numbers (650-475-4600 or 877-55-TIDAL) or via e-mail at tidal-support@cisco.com (please include your Cisco ID when emailing in)

Thanks to all for reading and happy automating!

-Shaun Roberts

shaurobe@cisco.com

TEO Support Team Lead

References: Example Tap -> https://supportforums.cisco.com/servlet/JiveServlet/downloadBody/15634-102-1-36945/Blog%202%20Monitor%20Example.tap.zip

CreatePlease to create content
Content for Community-Ad
FusionCharts will render here