Commodore
Commodore
1125 views

Is it possible to do Ping monitoring from OBM?

HI Team,

 

Is there any possibility to do ping monitoring other than OOB heart beat events? If yes please suggest

Labels (1)
0 Likes
15 Replies
Commander Commander
Commander

No, unless you create your own ping scripts and monitors.

As far as I know Microfocus suggests using SiteScope for host ping monitoring. We are currently doing that, deploying the SiteScope ping templates from OBM for convenience.

Commodore
Commodore

Hi JM_M

Yes i know this but in our environment we don't have SiteScope so the only hope is OBM.

0 Likes
Commander Commander
Commander

Well, you could do kind of a "poor man's SiteScope ping".

Use opr-node (maybe with a periodical schedule) to populate a file with all the nodes from a view containing the nodes you want to ping. Create a script that pings all the nodes from the list and runs an opcmon for each ping with a value depending on the result, and create a policy to get those results and generate the events.

You can use the target node as object to treat them as separate instances for threshold evaluation, and optionally also use the node name as "node" and/or "relatedCI" in the event.

In my opinion it's strange that neither OBM nor its older versions (OM, Openview, etc...) have pinged the monitored nodes, relying (in a rather unreliable way) on agent status in order to alert about the status of the node, but it is what it is.

Admiral Admiral
Admiral

yes, we use epi groove script.

An example where we use this is for critical nodes with a HB failed, we want to ping the node CI to verify if the node is down or unreachable.

For these events, we use EPI script to ping and enrich messages...

 

 

If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution. Don't forget to Kudo!!
Commodore
Commodore

Yes opr-node is an in-built tool shipped with OBM bu again this tool is work when OA is installed on the remote system and properly synced with mgmt server.

Basically what we want to achieve using ping is to monitor port 22 and if we simply rely on HB events from agents is not enough to check the state of server.

Just in case if we get into below scenarios where we cannot conclude that server is down. The only thing we can do is manual troubleshooting

Scenario 1: If agent is down but server is up.

Scenario 2: If agent is up and server is also but there might be some connection issue etc.

Commander Commander
Commander

I meant using opr-node with the "-list_nodes" and "-view_name" (or "-node_group") options to get a list of the nodes you want to ping from a script, to then run pings from the script and send the results to a policy with opcmon. That option doesn't rely on the remote agent being up.

Or as JimiT suggested, using a groovy script instead, triggered by HB failures (which is a more elegant solution).

Basically OBM won't by itself control nodes with ping, but it has tools to implement your own ping control.

Vice Admiral Vice Admiral
Vice Admiral

Hi,

Using script you can achieve ping monitoring in OBM, there are few steps for follow given below.

1. run below command to get all the nodes with OA agents in text file.

opr-agt -username admin -password OBMPASSWORD -query_name All_CIs_with_OM_Agents -list_agent_nodenames >> D:\scripts\nodedown\OBM_Nodes.txt

Note - Create folder "D:\scripts\nodedown"

2. Copy below ping script to get alert in OBM console, name it as nodedown.pl

$nodes='D:\scripts\nodedown\OBM_Nodes.txt';
$log='D:\scripts\pinglog.txt';
my $time=localtime();
my $exe = "cmd.exe /c D:\\HPBSM\\opr\\support\\sendEvent.bat";
open (READ, "$nodes");
open (LOG, ">>$log");
my $start_time=time;
my $count_up=0;
my $count_down=0;
while (<READ>) {
chomp;
$host=$_;
$ping_host=`ping -n 3 -w 1000 $host`;
if ($ping_host =~ /Reply from/i) {
print "$host alive\n";
# `$exe -a "HP Openview Operations" -o "Heartbeat Polling" -c Ping -sc Ping -s Normal -title \"Node $host Ping Up\" -nd $host -rch $host -eh "PingAvailability:Available"`;
$count_up++;
push @UP_nodes, $host;
}
else {
print "$host dead\n";

`$exe -a "HP Openview Operations" -o "Heartbeat Polling" -c Ping -sc Ping -s Critical -title \"Node $host Ping Down\" -nd $host -rch $host -eh "PingAvailability:Unavailable"`;

$count_down++;
push @down_nodes, $host;
}
}
close READ;
$end_time=time;;
$elapsed_time=$end_time-$start_time;
print "Time taken: $elapsed_time\n";
print "Nodes up count: $count_up\n";
print "Nodes down count: $count_down\n";
print "Down nodes: @down_nodes\n";
print LOG "$time: Hosts Up:$count_up Hosts Down:$count_down\n";

3. schedule below command using schedule task policy to run the script automatically at every specific interval.

"D:\Program Files\HP\HP BTO Software\nonOV\perl\a\bin\perl" D:\Scripts\nodedown\nodedown.pl

I assume you have installed OBM in D:\

Many Thanks..

Mithilesh

 

Fleet Admiral Fleet Admiral
Fleet Admiral

No, unless you sitescope. but i personally dont like this.

But this can be done very easy with some shellscripts in combination with fping. fping is very fast and is able to ping a lot of nodes in a second.

https://fping.org/

For some customer i created in sum 3 short basg scripts that get all nodes that need ping from RTSM, create a list for fping, parse the output fping creates for erorrs and save pingtimes into SCOPE.

unfortunately i cant provide the code here.

Commodore
Commodore

Hi Andreask,

 

@andreask Can you please share me the code and steps on my personal email so that I can test it in  my environment?

**PERSONAL INFORMATION REMOVED**

Regards

Gun

0 Likes
Fleet Admiral Fleet Admiral
Fleet Admiral

pm me. emails doent work in the forum.

 

0 Likes
Cadet 3rd Class Cadet 3rd Class
Cadet 3rd Class

Hello Andrea,

 

Can you please give me some more detailed information about ping monitoring from OBM using Fping

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.