sfvAlarms and vSphere 5.1

Thanks to Pascal for trying out sfvAlarms on newly released vSphere 5.1 (sfvAlarms is my import and export utility for vCenter alarms). The export is OK but not the import. Am looking into this now and hope to have another version that will be 5.1 compatible as well as backwards compatible with 4 and 5. Currently sfvAlarms only works with 4.0 and 5.0 as per User Guide description.

Have downloaded the 5.1 vCenter Appliance and 5.1 C# Web Services SDK and getting an error it looks like on the AlarmSpec when calling CreateAlarm. I can’t however see anything wrong withe spec! aaarrgghhh! I need to go back to something really simple and see if can create the simplest possible alarm in 5.1 to make sure not something awry at VMware’s end!. Nothing I can see in the revision updates seems to relate to alarms, although have noticed that there are now 61 default alarm definitions as opposed to the 54 in vSphere 5.0.

The VMware KB for restoring default vCenter alarms doesnt seem to work any more either for 5.1 (KB: 2009166) – at least I cant get the default alarms back on the 5.1 applicance.

*Update 12-Oct-2012

  • KB all good.. dont know what happened but works fine on v5.1
  • New version of sfvAlarms now on Download page (v.1.1.0) now with vCenter 5.1 support 🙂
Advertisements

15 thoughts on “sfvAlarms and vSphere 5.1

  1. Had a chance to do some investigation tonight… there is a parameter in AlarmSpec called ‘systemName’ that came in with v5.0 API. On export of alarms this was previously not filled in and not exported.
    With 5.1, this parameter now populated. However, this is set only for predefined Alarms – i.e. Alarms created by the server automatically and the default alarms. Editing or renaming Alarms from the UI does not affect this value, and user-created Alarms do not have a systemName at all. The purpose of this field is to identify system-created Alarms reliably, even if they are edited by users.

    On re-import then, alarms are all user-defined, so if this value present in the export, just needed to unset this parameter and all now import OK. One of the default alarms also has a name with length of 83 characters. This also causes error on re-import as max length appears to be 80.

    Need to do some more testing, but pretty sure that’s the issue. Will hopefully upload 5.1 compatible version later this week 🙂

    • Good finding Mr Stripeyfish! On my side, I was able tor restore the default alarms in vCenter 5.1 with the VMware KB. Make sure to restart the vCenter Service after adding the advanced parameters in vCenter.

      • Cheers Pascal, just need to retest against 4.0 and then will upload new version, hopefully later tonight. I had restarted the vCenter service via the  appliance management web page, but no alarms reappeared. Will try the KB again.

  2. Hi ! Thanks for this great app, but do you think there is a way to export and re import to a Datacenter object and not a vCenter object ?

  3. I have alarm defined in vCenter (root) folder but I need to export and import them on different folder like datacenters because each of my datacenters are managed by differents teams so I need to defined alarm on each datacenter folders. I hope you will understand me 🙂

    Great job continue like that !

    • Jeremy – you can do what you need as it stands. Check out the User Guide for editing the Alarmindex.xml file. Just tested it as follows:

      Spooled up my vCenter appliance and created two datacenters, DC1 and DC2. Created an alarm (Alarm1) at root level, created an alarm (AlarmDC1) in my first datacenter (DC1). Exported these alarms. Then removed these alarms (this is important as alarm names must be unique). I then edited the AlarmIndex.xml, changing tag for Alarm1 from ‘root’ to ‘/DC1’, and for AlarmDC1 from ‘/DC1’ to ‘/DC2’. I then imported these alarms. The orginal alarm create on root now created on DC1 and the alarm created on DC1 now created on DC2. Obviously the alarm parameters have to be valid for the type of entity you are moving the alarm to.

      But you should be able to do what you need 🙂 Let me know how you get on and thanks again for post.

  4. Hi There, Just tryed your app, it fails to export all our alarm’s. the logs show “Inv path for alarm definition ‘root’. any idea’s ?? Oh using sfvAlarms version 1.1.1.0 on a vCenter 5.1 server.

    • Can you let me know the path you were trying to export to? Was it the standard install path or did you specify a custom path in the options? Could you try to specify something like C:\Temp if you have rights to this path just to see if this works. Have you go lots of custom alarms? Did it export any or fail on the first one? thanks.

      • exporting to path “C:\Data”. There are 175 alarms at the top vCenter level, quite a few are created by the Dell management plugin (hardware monitoring). Out of that 175 only 68 were exported by sfvAlarms. Looking at the exported XML files only 5 are these Dell plugin created alarms. Seems to have missed the majority of these Dell Alarms. I can send you the list of vCenter alarms and exported alarms if you send me an email address. Thanks your help.

      • Thats a lot of alarms! There could be something in the name or path character I havent seen before. If you could send me a list of the alarms I’ll take a look: send to ‘admin at stripeyfish dot co dot uk’.

      • I have uploaded a new version (v1.1.2) – see Download page. I installed the Dell Management Appliance / plug-in which added all the new alarms into my 5.1 vCenter. The issue was that some of the alarms use a colon (:) in the name. As the alarms get written out using the alarm name for the name of the xml file, this was going to be an issue as non-supported character in the alarm name. I have updated the code to used the escaped data version of the alarm name for the file name. I have run a test on exporting and importing all the default alarms and all the Dell alarms together – some 169 alarms(!) – all seems good now. The old format alarms will still import as well. Let me know how you get on, cheers SF.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s