VMware Cloud Community
olegarr
Enthusiast
Enthusiast
Jump to solution

Is it possible to create Alarms by using CLI?

Hello:

I am wondering if it's possible to create Alarms (with specific settings) on VC by using commands (script) thorugh CLI. Is it possible? Is there any examples?

I know it's very easy to create alarms (with specific settings) manually, but I want to distribute the script and create the same alarms (maybe delete all existing alarms before) on all my VCs very quick.

Please let me know if you have any ideas where should I start.

Best regards,

Olegarr

0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

No problem, you're more than welcome Smiley Wink


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

0 Kudos
6 Replies
Zsoldier
Expert
Expert
Jump to solution

I don't think that is something you can do through the CLI. If you are using vCenter though, you might be able to export a copy of the table(s) from the vCenter database that has the alarm configurations and import that into other instances.

K. Chris Nakagaki (Zsoldier)

http://tech.zsoldier.com

Chris Nakagaki (中垣浩一)
Blog: https://tech.zsoldier.com
Twitter: @zsoldier
0 Kudos
admin
Immortal
Immortal
Jump to solution

There are no cmdlets for that in PowerCLI.

That said, have a look at New-TkeAlarm in the VI Toolkit Extensions.

=====

Carter Shanklin

Read the PowerCLI Blog
[Follow me on Twitter|http://twitter.com/cshanklin]

0 Kudos
olegarr
Enthusiast
Enthusiast
Jump to solution

Chris,

Thank you very much for your reply.

If it's not possible to create alarms by using CLI it will change whole my plan...

Can someone else prease share their thoughts?

Thanks a lot,

olegarr

0 Kudos
LucD
Leadership
Leadership
Jump to solution

You can create alarms from PowerShell through the SDK method CreateAlarm.

See and for some examples.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

olegarr
Enthusiast
Enthusiast
Jump to solution

Luc,

Thanks a lot for your help. I'll follow you advice, however I might still ask you few questions:).

Thanks again,

olegarr

0 Kudos
LucD
Leadership
Leadership
Jump to solution

No problem, you're more than welcome Smiley Wink


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos