How to find existing SNMP Community string from a CI

Imran Akram
Tera Contributor

I am looking to find out how you can find the SNMP Community string from an existing CI record in CMDB.

I have an existing IP Switch for example but having trouble finding the SNMP community string which has been added.

2 ACCEPTED SOLUTIONS

See password and SNMP strings are stored but as encrypted . So you can not read it from Credential Table . 

 

You need to store it Locally in string for ur future reference . 

 

Regards

RP

View solution in original post

@Imran Akram no problem! happy to help.

Yes the name of the credential, also in the first line you can reuse the same script for retrieving passwords from other credential table discovery_credentials for example basic auth credentials etc. Let me know if you have any more question?

If my response helps to solve your issue, kindly click thumps up to mark it as helpful and accept solution.

View solution in original post

8 REPLIES 8

Rahul Priyadars
Giga Sage
Giga Sage

are u looking for exact String of SNMP .

Which SNMP is used you can find from this table record- IP Affinity - dscy_credentials_affinity

 

RahulPriyadars_0-1694667801264.png

 

 

Regards

RP

 

 

Hi Rahul, 

I have the IP address, Credential ID and which credential is relates to in the Credential table.
But issue i have is i cant see what the string is: 

 

ImranAkram_0-1694684813779.png

 

same as your screenshot i can see the MID server, Credential ID, IP Address etc.

I have tried searching via Credential ID within the credential table and doesnt bring any results.

See password and SNMP strings are stored but as encrypted . So you can not read it from Credential Table . 

 

You need to store it Locally in string for ur future reference . 

 

Regards

RP

Prabu Velayutha
Mega Sage
Mega Sage

Hi @Imran Akram 

 

You can retrieve the credentials using this Script and run it in the background script to decrypt the encrypted password. This will be handy incase you have not saved the password locally. As admin you can run this background script and retrieve the encrypted password. Best practice is to store the credentials in vault like cyberArc.

 

var gr = new GlideRecord('discovery_credentials');
gr.addQuery('name','mention name');
gr.query();
if(gr.next()){
var Encrypter = new GlideEncrypter();
var decrypted = Encrypter.decrypt(gr.password);
gs.print(decrypted);
}