2011년 6월 10일 금요일

SCOM: How to monitoring Linux script file - part 2

As follow-up of the post about how to monitoring linux script file, I'll explain that creating configurable monitor type and recovery type which mean reusable by many similar monitors.


The previous post, It wasn't able to reuse the monitor type, because I wrote a certain command and file path in Module types (Monitor type and write action).


Looking at Module type, each module has "configuration schema" tab. MP authors can define configuration values in configuration schema tab to pass the values to the later step.

Figure 1. Configuration schema tab.


This time, I assume that I'd like to make one monitor type and to create some monitors which monitoring different script files. Changeable properties are related to the script, in other words, a script command and file path for SFTP.


Step 1. Add configuration for Monitor type.
As first step, I added a configuration named "ShellCommand". 

Figure 2. Configuration schema tab of the Monitor type


Go to Member Module tab and click Edit button.

Figure 3. Member modules tab of the Monitor type


In the ShellCommand field, type "$Config/ShellCommand$". this value is then added value in Configuration Schema tab.

Figure 4. Configuration window of Member modules tab

Step 2. Add configuration for Recovery Action.
The second step, it is similar to the first step, is modifying recovery action.
I add two configurations, "Source" is the field which contains full path of the source file on Windows and "Target" is the full path of target on Linux.

Figure 5. Configuration schema tab of the Recovery action


Then, I mapped above two values to correspond fields.

Figure 6. Configuration window of the Recovery action

Step 3. Create a monitor.
After earlier two steps, I was creating a monitor from the monitor type.

Figure 7. Create a Monitor

Go to the configuration tab.
I have to set the shell command that I want to execute.

Figure 8. Configuration tab of the Monitor


This is the point which is different from previous post. As I put the new command whenever I define a new monitor, I can easily create the different monitor from the same monitor type.


Go to the Diagnose and Recovery tab. and I added a Recovery action.
Click Edit button.

Figure 9. Action pane of the Diagnose and Recovery window

Put the right paths for those field.

Figure 10. Configuration for recovery action

댓글 1개: