Server Management - Systems Insight Manager
1753438 Members
4993 Online
108794 Solutions
New Discussion юеВ

Re: SNMP Location field

 
OlivierV
Trusted Contributor

Re: SNMP Location field

You can do that using a SNMP tool that allows you to launch SNMPSET commands from DOS. This is what I do for our server.
I have a TXT file with the IP address of the server and the location I want to set. With a DOS batch, I use this file for the entries and launch the SNMPSET command for all these servers (with a FOR command).
As we have the SNMP write community which is the same for all the servers, no need to have a login account, the write community is enough.
David Claypool
Honored Contributor

Re: SNMP Location field

Guys:

HP SIM 5.0 has a feature called 'Configure or Repair agents" that does this automatically.
orven
Frequent Advisor

Re: SNMP Location field

Thanks Guys!

I tried to select three servers that I cannot access SMH that iand always asking me for password. one of them worked but the two servers no.

What I did:
I went to my CMS then select three servers go to configure then configure or repair agents, provide all the info and passwords etc.

It then try accessing SMH and it didnt work, login rejected.
the only difference is the two serves is not in my AD domain.. all in workgroupp..

any idea. Is there a way to do trust all.. how do i do it.
mark q
Regular Advisor

Re: SNMP Location field

login to the smh

- security
- trusts
- trust all

not reccomended.. you can configure the trusts through hpsum - configure components
mark q
Regular Advisor

Re: SNMP Location field

I wrote a vbscript today that will take an input file (servers.txt) and will write a batch file for net snmp to update the location for the servers.

here's the script - all you have to do is change your snmp write community and your domain suffix (that way you can have a server list without fully qualified names)

Const ForReading = 1
Const ForWriting = 2

'replace your write community - with your snmp write community
'replace your domain suffix (with the domain suffix you have for your hosts)

strrackname = InputBox("What is the Rack Location", "Data Center Rack Location", default)
'create the blank text file
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.CreateTextFile("support.cmd")
objFile.Close
Set objFSo = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile("servers.txt", ForReading)
strContents = objFile.ReadAll
objFile.Close
arrLines = Split(strContents, vbCrLf)
Set objFile = objFSO.OpenTextFile("support.cmd", ForWriting)
For i = 0 to UBound(arrLines)
objFile.WriteLine "snmpset -v1 -c" & chr(34) & "your write community" & chr(34) & " " & arrLines(i) & ".your domain suffix" & " system.sysLocation.0 s " & chr(34) & strrackname & chr(34)
Next
objFile.Close