HPE OneView
1752428 Members
5581 Online
108788 Solutions
New Discussion

HPEOneView7.0 Force add server hardware as monitored failed via Rest API

 
SOLVED
Go to solution
HPESeven
Advisor

HPEOneView7.0 Force add server hardware as monitored failed via Rest API

Hello, Guys, 

Good day.

I'm now going to force add some servers into the OneView instance as monitored.

Refer to the Rest API doc,  I run the cmd line below,  the server hardware has been successfully added into the OneView instance, but it has been added as "managed" not 'Monitored" 

which is a little bit strange, I also tried the cmd on version 6.5, but we got the same result.

curl -k -H "accept: application/json" -H "content-type: application/json" -d '{ "hostname":"192.168.1.200","username":"admin","password":"admin","force":true,"licensingIntent":"OneViewStandard","configurationState":"Monitored" }' -H "auth: $sessionID" -X POST https://192.168.1.100/rest/server-hardware

 

POST https://{appl}/rest/server-hardware
Content-Type: application/json
Auth: abcdefghijklmnopqrstuvwxyz012345
X-Api-Version: 4000
{ "hostname" : "enc-ilo.corp.com",
"username" : "Administrator",
"password" : "mypassword",
"force" : false,
"licensingIntent":"OneView",   -> changed to "licensingIntent":"OneViewStandard",
"configurationState":"Managed", -> change to "configurationState":"Monitored"

monitored.PNG

 

 

I very much appreciate it if there is any update, thanks in advance.
Best Regards
Seven 

 

 

6 REPLIES 6
MRyan1
Occasional Contributor

Re: HPEOneView7.0 Force add server hardware as monitored failed via Rest API

The servers were already managed and you were trying to change them to monitored? Or they were not in OV and you were just trying to add them as Monitored?

thnaks-

HPESeven
Advisor

Re: HPEOneView7.0 Force add server hardware as monitored failed via Rest API

Hi, MRyan1,

Thanks for your comments. 
 My scenario is, that I have two OV instances,  OV-1, OV-2 

The server hardware has been monitored by OV-1,   but I  forgot the OV-1's password.  therefore I'd like to add the server hardware into OV-2 as Monitored. 

Refer to the Rest API doc: To force add server hardware as Monitored 

I updated these parameters

 "licensingIntent":"OneView",   -> changed to "licensingIntent":"OneViewStandard",
"configurationState":"Managed", -> change to "configurationState":"Monitored"

By using the cmd below, The server hardware 192.168.1.200 should be added into OV-2 as Monitored right?

But As I checked, the server hardware has been added into OV-2 as Managed, I had changed the parameters 

"configurationState":"Managed",   to "configurationState":"Monitored"  

 "licensingIntent":"OneView",   to "licensingIntent":"OneViewStandard",

The serevr should be added as Monitored,  but it didn't, I don't know if there is someting I missed 

curl -k -H "accept: application/json" -H "content-type: application/json" -d '{ "hostname":"192.168.1.200","username":"admin","password":"admin","force":true,"licensingIntent":"OneViewStandard","configurationState":"Monitored" }' -H "auth: $sessionID" -X POST https://192.168.1.100/rest/server-hardware

 Thanks much for your time.

BR

Seven

MV3
HPE Pro

Re: HPEOneView7.0 Force add server hardware as monitored failed via Rest API

We can help you reset the Administrator password of you OV-1, For that you will have to open a support case with HPE.

Are you trying to add a Blade server or a DL Server to OV-2?

 

I am an HPE employee.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo
HPESeven
Advisor

Re: HPEOneView7.0 Force add server hardware as monitored failed via Rest API

@MV3 

Hi, MV3, 

Thanks much to let me know that, I think I will create a support ticket for password reset next time, 
The OV-1 instance has been force deleted by myself 

 

Currently, I'd like to force add server hardware into OV-2 as monitored via Rest API,   
Would you please kindly help me to have a look at my Rest API script, I have strictly followed the Doc, but it still failed to add them as Monitored,  no matter what parameter  I set, the server hardware will be added as Managed.  

Thanks much.

BR

Seven

MV3
HPE Pro

Re: HPEOneView7.0 Force add server hardware as monitored failed via Rest API

Hi Seven,

 

The script looks good.

 

We might have to replicate this issue in our LAB and check.

 

Please open a support case for further troubleshooting.

 

 

Cheers.

 

 

I am an HPE employee.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo
HPESeven
Advisor
Solution

Re: HPEOneView7.0 Force add server hardware as monitored failed via Rest API

Hi @MV3 ,

Thanks much.  I will create a case next time. 

The issue is fixed,  I try the cmd below, and the server hardware has been added as monitored successfully

But Not sure why putting them into one cml could not work properly.  It's okay, I can go ahead with my work, thanks for your time.

curl -k "https://192.168.1.100/rest/server-hardware" \
> -X POST \
> -d "{ \"hostname\" : \"192.168.1.200\", \"username\" : \"admin\", \"password\" : \"admin\", \"force\" : true, \"licensinnState\":\"Monitored\"}" \
> -H "X-API-Version: 4000" \
> -H "Auth: asdasdasdasdadasdasdasdasdasasdasdsa" \
> -H "Content-Type: application/json"