ashish1 Respected Contributor.
Respected Contributor.
623 views

SNMP TRAP command used by performance agent

I have configured OVPM agent to send snmptrap to another destination whenever threshold in the alarmdef is exceeded.

 

The problem here is application uses path with space, and windows can not execute the command as it sees space in the directory name.

 

C:\PROGRA~1\HP\HP BTO Software\bin\ovtrap

 

HP BTO Software   Space after HP

 

Windows is taking complete path as 'C:\PROGRA~1\HP\HP'

 

The correct way is to execute the  command is by adding the quote in the complete path

 

"C:\PROGRA~1\HP\HP BTO Software\bin\ovtrap" -s critical 10.52.109.71 "Global swap space is nearly full GBL_SWAP_SPACE_UTIL"

 

 

Can any one suggest configuration file name to do this change ???

 

 

Error from status.alarm file

 

**** C:\Program Files\HP\HP BTO Software\bin\perfalarm.exe : 9/30/2015 10:55:31 AM ****
ERROR: Attempt to send msg to OVO failed with result 2. Correct the problem with the OVO agent and restart alarms to resume messages to OVO from perfalarm. (AG1-84)
'C:\PROGRA~1\HP\HP' is not recognized as an internal or external command,
operable program or batch file.

**** C:\Program Files\HP\HP BTO Software\bin\perfalarm.exe : 9/30/2015 10:55:31 AM ****
C:\PROGRA~1\HP\HP BTO Software\bin\ovtrap -s critical 10.52.109.71 "Global swap space is nearly full GBL_SWAP_SPACE_UTIL"

0 Likes
7 Replies
Account_Closed
Not applicable

Re: SNMP TRAP command used by performance agent

you should be able to call ovtrap directly, without giving full path. if that does not work, as a workaround, you can code in the short folder names for \hp bto software\... etc.

 

I googled how to get the windows short path and found a nice solution here - http://superuser.com/questions/348079/how-can-i-find-the-short-path-of-a-windows-directory-file

 

In short -

you can use a script such as this to get the short path to the binary.

 

@ECHO OFF
echo %~s1

name this as getshortpath.bat, and run as below

 

getshortpath  "C:\Program Files\HP\HP BTO Software\bin\ovtrap.exe"

 

try this out it might fix your problem.

 

please log a CR for this so we can better this on our side too - at least improve our documentation.

 

- ramd

0 Likes
ashish1 Respected Contributor.
Respected Contributor.

Re: SNMP TRAP command used by performance agent

Thanks for reply. 

 

Actually OVAlarm section of the performance manager s/w is calling with the full path name. I do not know if there is any configuration file where in we can change to short name or add quotes.

0 Likes
Account_Closed
Not applicable

Re: SNMP TRAP command used by performance agent

performance manager or performance agent? there's no alarm capability in performance manager (OVPM).

 

is this the alarmdef file? you can edit the alarmdef file - no problem.

 

- ramd

0 Likes
ashish1 Respected Contributor.
Respected Contributor.

Re: SNMP TRAP command used by performance agent

It is performane agent which is packaged it with OVO agent.

 

Yes in alarmdef file you can defined threshold. and in agsysdb you can create trap destination to send snmp trap. 

SO when trap is generated by the application  but log file shows following error. 

 

Quotes needs to added for the entire path. Do you aware of any configuration file or ??

 

**** C:\Program Files\HP\HP BTO Software\bin\perfalarm.exe : 9/25/2015 3:35:22 PM ****

C:\PROGRA~1\HP\HP BTO Software\bin\ovtrap -s minor 10.52.109.71 "Test Alarm continuing"

'C:\PROGRA~1\HP\HP' is not recognized as an internal or external command,

operable program or batch file.

 

 

The command should be with quotes at both end.

C:\PROGRA~1\HP\HP BTO Software\bin\ovtrap -s minor 10.52.109.71 "Test Alarm continuing"

0 Likes
Account_Closed
Not applicable

Re: SNMP TRAP command used by performance agent

pl provide OM agent version. I would recommend raising a support case so a fix can be provided.

 

- ramd

0 Likes
Highlighted
Super Contributor.. NioByte Super Contributor..
Super Contributor..

Re: SNMP TRAP command used by performance agent

This is due to the whitespace in the command path as already mentioned.

 

If you use a 8.3 filepath it should work. As the majority of the current command path is using 8.3 directory names. Except for the "HP BTO Software" part

 

It seems ovpath shortname functionality was unable to determine this particular short directory name.

 

By this point the software will have to be updated with a fix, as I am also unaware of a configuration file that can set the path to ovtrap.

 

Confirm that the 8.3 filename exists, this can be checked via a command-prompt:

 

dir /x C:\PROGRA~1\HP\

 

It should be something like HPBTOS~1.

 

In this instance the command will have to be set as:

 

C:\PROGRA~1\HP\HPBTOS~1\bin\ovtrap -s <SEVERITY> <IP> "<TRAP_MESSAGE_TO_SEND>"

 

Ovpath will need to be updated to determine the 8.3 shortpath for that directory.

0 Likes
Account_Closed
Not applicable

Re: SNMP TRAP command used by performance agent

Niobyte, looks like a fix is needed from lab, as this path is framed inside the perfalarm code.

 

I recommend logging a support case.

 

- ramd

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.