Re: HP SiteScope - Creating templates without uniqueness violation (1095 Views)
Reply
Valued Contributor
Posts: 350
Registered: ‎10-09-2012
Message 1 of 14 (1,328 Views)

HP SiteScope - Creating templates without uniqueness violation

Dear Experts,

I am trying to create a template that would deploy monitors in the correct folders.

For example,

GroupA

  - GroupB

    -GroupC

      -Hostname

        - monitorA

        - monitorB

 

I am hoping to create a template so when I deploy the template at the top level, SiteScope will know which group to deploy the monitors in. 

I tried to create a template like this, however, I get a uniqueness violation because when I deploy the template for the 2nd time for other monitors, Sitescope says that the Groups with the exact name already exists therefore i get a uniqueness violation.

 

Any advice is very much appreciated.

Thanks,

Valued Contributor
Posts: 350
Registered: ‎10-09-2012
Message 2 of 14 (1,318 Views)

Re: HP SiteScope - Creating templates without uniqueness violation

Sorry I forgot to mention that I am currently using SiteScope 11.22 installed on RHEL.
HP Expert
Posts: 230
Registered: ‎05-23-2012
Message 3 of 14 (1,280 Views)

Re: HP SiteScope - Creating templates without uniqueness violation

Hello,

 

Please can you send us/share the  template are you trying to deploy?

 

Also, can you share the the steps you follow to deploy the template?

"HP Support
If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution."
Valued Contributor
Posts: 350
Registered: ‎10-09-2012
Message 4 of 14 (1,262 Views)

Re: HP SiteScope - Creating templates without uniqueness violation

Battushi,

Thanks for the reply.

The attached file is a snapshot of the template i am trying to deploy.

So basically we are trying to separate all our servers and we currently have like 4 levels in the hierarchy.

So some of the servers may have the exact same hierarchy...meaning the exact same paths like level 1, level 2, level 3, level 4 may have the exact path and names for some of the hosts.

So lets say I want to deploy monitors A and monitors B separately that also have the exact same group names.

 

How can I do this in SiteScope through just one deployment rather than deploy the template multiple times?

 

Any advice on this is very much appreciated.

Thanks,

Valued Contributor
Posts: 350
Registered: ‎10-09-2012
Message 5 of 14 (1,255 Views)

Re: HP SiteScope - Creating templates without uniqueness violation

As for the steps, basically I deployed this template through a CSV file, but if monitor A and monitor B have the exact same hierarchy and group names, SiteScope says its a uniqueness violation and I am unable to deploy the template.
Thanks,
Occasional Advisor
Posts: 10
Registered: ‎01-19-2011
Message 6 of 14 (1,213 Views)

Re: HP SiteScope - Creating templates without uniqueness violation

I too would find this useful... if you want to create nested groups via template it would be very nice to have.

 

For instance:

 

MiddleWareApp1

---->Servername1

------------>MonitorCPU

------------>MonitorServices

------------>MonitorURL

---->Servername2

------------>MonitorCPU

------------>MonitorServices

------------>MonitorURL

MiddleWareApp2

---->ServernameX

------------>MonitorCPU

------------>MonitorServices

------------>MonitorURL

 

In this case, the template always fails because it tries to create a new group called MiddleWareApp1 for Servername2, which already exists because that group was created when deploying Servername1

 

 

Here would be the CSV for that:

 

Variables: appname (MiddleWareApp1, 2), hostname (Servername1, 2)

 

MiddleWareApp1,Servername1

MiddleWareApp1,Servername2 (this would fail, as MiddleWareApp1 already exists)

MiddleWareApp2,ServernameX

Trusted Contributor
Posts: 249
Registered: ‎05-20-2013
Message 7 of 14 (1,201 Views)

Re: HP SiteScope - Creating templates without uniqueness violation

This is one of the features that I would have loved to have when we first setup our environment, but I don't think it exists to date.

Depending on number and solution date, you could

*group(which you probably already did) your serves by hierarchy in a list

*create the lowests hierarchy folder and deploy all servers ther via csv(which takes a second or two)

and then just cut/paste them over to create your full tree.

 

regards

Occasional Advisor
Posts: 10
Registered: ‎01-19-2011
Message 8 of 14 (1,171 Views)

Re: HP SiteScope - Creating templates without uniqueness violation

Yes, that is what we're going to have to do.. we also will put the name into the name of the monitor so that it is easy to identify which monitors go into which group... and then use global search and replace to remove the strings after the monitors are in their appropriate groups.

 

Either that or just leave them all in 1 giant group, and leave the 'appname' in front of the hostname in the monitor name... might look a little more messy, but it's easy.

 

It's really too bad that templates require a group..  if you could just pick the group and deploy directly into the group it would be a bit nicer.

Frequent Visitor
Posts: 2
Registered: ‎10-28-2013
Message 9 of 14 (1,095 Views)

Re: HP SiteScope - Creating templates without uniqueness violation

Hi,

 

I'm using this easy and 'tricky' technique to avoid "uniquess violation" for groups.

 

1rst I've set this parameter to "true" in master.config, it allows  create monitors directly on templates and no groups are required to create when a template is defined

 

_allowTemplateMonitorDirectlyUnderTemplate=true

 

The "uniquess violation" still occurring if the Group name is fixed, but to avoid it I use to create groups during the template deployment. And then the single monitors are created under one single group

 

It allows me to create monitoring structures like

 

Group 1

   monitor-1

   monitor-2

   monitor-3

   etc... 

 

Because before the change of this parameter  I was having the "uniquess violation" error for Group Names when the name was fixed on template, and when I used variables to automatically name the groups SIS created monitors like:.

 

group 1

   monitor - 1

 

group 2

   monitor - 2

 

etc...

 

Hope this helps

 

 

Trusted Contributor
Posts: 354
Registered: ‎09-04-2012
Message 10 of 14 (1,082 Views)

Re: HP SiteScope - Creating templates without uniqueness violation

I may not fully understand the problem, but I have templates with somewhat complex nested groups and deploy them regularly.  The group name contains a variable (the server's name).  Using this method, I have deployed 800 servers in one CSV file without uniqueness issues.  Each monitor also contains the the variable, so it will say:

 

ServerName (master group)

 - ServerName - Metrics (group) + dependency to Availabiity monitor

   - ServerName - EventLog (monitor)

   - ServerName - PerfMon (monitor)

 - ServerName - Availability (monitor)

 

ServerName is a variable (the only one for this template)

 

My VMware templates are more complex and have 3 group levels total since I put all guest machines "under" the host for dependency linking. 

 

So:

 

ESXiDCName (master group)

- ESXiHost1 (group)

  - ESXiHost1 - Availability (monitor)

    - ESXiHost1 - Metrics (group)

      - ESXiHost1 - CPU (monitor)

      - ESXiHost1 - Memory (monitor)

- ESXiHost2 (group)

  - ESXiHost2 - Availability (monitor)

    - ESXiHost2 - Metrics (group)

      - ESXiHost2 - CPU (monitor)

      - ESXiHost2 - Memory (monitor)

- ESXiHost Guests (group)

 

I use 3 variables for this template - ESXiHost1, ESXiHost2, and ESXiDCName for the datacenter name so it mirrors what vCenter looks like.  This would be for a two-host HA deployment.  Guests are added separately with a standard Windows/Linux template.

 

Anyhow..  when i deploy I just right-click on the location where I want this structure to build out.  We put these into site folders which are basically root folders that contain everything for a site (servers, storage, etc).

 

I am sure it's not this simple - the comment about having SiteScope "know where to put" something may be where I am misunderstanding.

 

 

Occasional Visitor
Posts: 1
Registered: ‎03-25-2014
Message 11 of 14 (970 Views)

Re: HP SiteScope - Creating templates without uniqueness violation

Please tell us how you did this? Thanks in advance..

Occasional Visitor
Posts: 3
Registered: ‎01-17-2013
Message 12 of 14 (311 Views)

Re: HP SiteScope - Creating templates without uniqueness violation

Hi ,

 

is there any news about this issue? we need this possiblity too

Visitor
Posts: 2
Registered: ‎01-21-2015
Message 13 of 14 (83 Views)

Re: HP SiteScope - Creating templates without uniqueness violation

So any news on this?

 

It feels like HP is intentionaly not answering the question, what would be the use of having a template if it can't replicate the tree we are trying to create?

 

I have a SNMP Monitor on Machine X (and I have dozens of machines like this one)

There are over 200 instances under that machine I want to monitor.

 

I DON'T want or need a group for every instance, I need 1 group for the machine and then several monitors under that one group.

 

Don't tell me to "enable creating monitors under the template itself" and manually create a group for each machine, that is an extremely not elegant way to resolve this simple request, and will consume more work hours when I need to deploy new machines!

HP Expert
Posts: 2,193
Registered: ‎04-28-2011
Message 14 of 14 (62 Views)

Re: HP SiteScope - Creating templates without uniqueness violation

The approach is not correct, as group/monitor instances need to fit the template definition to keep track for "publish changes" feature (if you don't care about this feature then fix is to create monitor under template). This error is shown if you have in template

 

Group > Monitor

 

and then try to deploy 3 times (or CSV with 3 lines) to get: Group > monitor1, monitor2, monitor3.

 

You may create the template as

 

Group > monitor1, monitor2, monitor3

 

and then deploy once.  Then to add new monitors you create monitor4 under the template and then publish changes.

 

 

Kenneth Gonzalez
HP Support

If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.

If you haven’t tried it yet, come and join us in our entitled forums at Support Customer Forums
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.