I'm not quite clear on some of the details of your message but maybe this will
help. I'm not sure what you mean by discover after the server is in Spectrum.
If you want to add the server to Spectrum but not move it to its correct
location and monitor it until some future date then maybe you can discover and
model it but leave it in maintenance mode. Then, when you're ready, move it to
its correct container and take it out of maintenance.
Anyway, outside of the Discovery console there's no direct way to invoke a
discovery that I know of but you can improvise using the modelling gateway and
a schedule. I use Perl and VNMSH - I haven't investigated whether it's possible
to use web services but it would be faster if you can, although VNMSH works
reliably and IME speed isn't normally a big issue unless you're doing a lot of
discoveries. Here's a simplified, rough approximation of what I do:
1. Create your XML discovery config file. I use Perl to generate them
based on a file I originally exported from the Discovery Console. Make sure you
include modeling information as well as discovery.
2. Import the XML file using the modelinggateway.bat script under
SS-Tools eg (in Perl):
my $cmd = "$SPECROOT/SS-Tools/modelinggateway.bat -vnm $landscapeName -i
\"$xmlFile\" -o \"$logFile\" -debug \"$debugFile\"";
my $result = system("$cmd ");
3. grep the handle of the discovery config you just created from $logFile
or $debugFile. It will write something like this to the log file:
Model AdiscConfig:my_discovery_config_name was created with model ID 94c6fa
4. Associate the discovery with your custom schedule on the same
landscape
create association rel=Discovery_Schedules lmh=$discoveryModelHandle
rmh=$scheduleModelHandle
5. Activate the schedule - this starts the discovery/modeling
update mh=$scheduleModelHandle attr=0x1298d,val=1
Moving a server to another container is simple enough - just delete/recreate
the Collects association between the server and its container:
destroy association -n rel=Collects lmh=$oldContainerHandle rmh=$
serverModelHandle
create association rel=Collects lmh=$newContainerHandle rmh=$serverModelHandle
You can only do that to move the server to another container on the same
landscape, of course. If you need to move it to another landscape you have to
destroy and rediscover it.
Working out where to place the servers is much harder :). I use Perl and VNMSH
to query Spectrum and calculate the IP ranges on the switches from the
interface IP addresses and subnet masks. From that you can usually work out
where to place the server based on which IP range it fits into.
Hope that helps.
Craig Porter, Enterprise Systems Management - Availability & Performance
Monitoring
Marsh & McLennan Companies
Global Technology Infrastructure (MGTI) | Centralized Operations
Sackville House 1.6, 143-149 Fenchurch Street, London EC3M 6BN, Great Britain
+44 (0)20 7178 4827 | Mobile +44 (0)7585 803 093 |
[email protected]<mailto:[email protected]>
www.mmc.com<http://www.mmc.com/>
From: Chandler, Bradford [mailto:[email protected]]
Sent: 10 October 2013 16:07
To: spectrum
Subject: [spectrum] web services and invoking actions
We're new to web services and the task we're looking to do:
We are looking to do scheduled discoveries and, by model name or some other
definitive search pattern (maybe network address, etc.), we'd like to move the
discovered device to specific containers.
Another group (our midrange group) is looking to be able to use web services to
insert a server into a container, and THEN run a discovery after it is IN
Spectrum.
So, two parts to this question:
a.) Anybody have some existing web services scripts or likewise on how to do
the placement into containers based on a certain criteria?
b.) Anybody know how to invoke an action (discovery) via web services and, if
so, what is the action code for discovery? I know that via CLI we can invoke
actions but 'discover' is not one that is advertised and I'd prefer to not have
to invoke CLI every time we add a server into Spectrum. Since CLI is such old
code (old SSAPI single threaded stuff if I remember correctly), it can be
painfully slow.
Thanks for any thoughts.
Brad Chandler
* --To unsubscribe from spectrum, send email to
[email protected]<mailto:[email protected]> with the body: unsubscribe spectrum
[email protected]<mailto:[email protected]>
Marsh Ltd Registered in England Number: 1507274
Registered office 1 Tower Place West, Tower Place, London, EC3R 5BU
Marsh Ltd is authorised and regulated by the Financial Conduct Authority
This message and any attachments are confidential. If you have received this
message in error please delete it from your system. If you require any
assistance please notify the sender. Thank you.
---
To unsubscribe from spectrum, send email to [email protected] with the body:
unsubscribe spectrum [email protected]