- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-06-2017 12:04 PM
I'm working on implementing discovery and have come across a device that is not getting classified correctly. The OID in the classify input tells me it's BIG-IP vCMP Guest. While I could easily add the OID to the SNMP OID Classifications table, I'm not capturing the relationship between the vCMP hosts and guests (more info here). Has anyone implemented a probe/sensor combo to accommodate this?
Solved! Go to Solution.
- Labels:
-
Discovery
-
Service Mapping
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-07-2017 01:11 AM
Hi Dan,
I have been meaning to look at this for an existing project but have not got around to it yet.
Ideally the F5 MIB would contain OIDs we can use to find this information and I haven't had chance to check properly to see if there is anything.
We had to change the identifier when discovering the vCMPs because they shared the same serial number as the host so we added a new identifier on the serial number and name which will work as long as F5s never have their name changed.
The next step I think would be to mark these as virtual and as the F5 table extends from the computer class the virtual flag is available on the F5 table.
To set this though I think would need a new classifier for the vCMPs. The classifier (lets call it F5 BIG-IP vCMP) would trigger the exact same probes as the other F5 classifier but in the 'On classification script', we can set the virtual flag:
current.virtual = true;
We can then set the vCMP System OIDs to trigger this new classifier.
Next we need to create the relationship. Ideally, this is where we might get something from the host F5 discovery and it might be possible by querying some F5 OIDs. But in the absence of this, we could use serial number which is not ideal.
The following Business Rule does rely on serial number being the same for both vCMP and host which it has been for the vCMPs I have seen:
Name: F5 vCMP add relationship
Table: cmdb_ci_lb_bigip
When: after
Insert: true
Update: true
Condition: current.virtual == true
(function executeRule(current, previous /*null when async*/) {
var hostGR = new GlideRecord('cmdb_ci_lb_bigip');
hostGR.addQuery('virtual', false);
hostGR.addQuery('serial_number', current.serial_number);
hostGR.orderByDesc('last_discovered'); // In case of duplicates, find last discovered
hostGR.query();
if (hostGR.next()) {
new DiscoveryFunctions().createRelationshipIfNotExists(current.sys_id, hostGR.sys_id, "Virtualized by::Virtualizes");
}
})(current, previous);
In the above, the BR will only run for a vCMP (virtual). It will then look for a non-virtual F5 (host) with the same serial number and create the relationship.
I haven't tested any of this apart from the identification and a couple of manual inserts in the F5 table to check the business rule. But if you do try something similar, let me know how you get on. Or even better, if you know any OIDs we could query from the F5 MIB, even better!
Regards,
Dave
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-07-2017 01:11 AM
Hi Dan,
I have been meaning to look at this for an existing project but have not got around to it yet.
Ideally the F5 MIB would contain OIDs we can use to find this information and I haven't had chance to check properly to see if there is anything.
We had to change the identifier when discovering the vCMPs because they shared the same serial number as the host so we added a new identifier on the serial number and name which will work as long as F5s never have their name changed.
The next step I think would be to mark these as virtual and as the F5 table extends from the computer class the virtual flag is available on the F5 table.
To set this though I think would need a new classifier for the vCMPs. The classifier (lets call it F5 BIG-IP vCMP) would trigger the exact same probes as the other F5 classifier but in the 'On classification script', we can set the virtual flag:
current.virtual = true;
We can then set the vCMP System OIDs to trigger this new classifier.
Next we need to create the relationship. Ideally, this is where we might get something from the host F5 discovery and it might be possible by querying some F5 OIDs. But in the absence of this, we could use serial number which is not ideal.
The following Business Rule does rely on serial number being the same for both vCMP and host which it has been for the vCMPs I have seen:
Name: F5 vCMP add relationship
Table: cmdb_ci_lb_bigip
When: after
Insert: true
Update: true
Condition: current.virtual == true
(function executeRule(current, previous /*null when async*/) {
var hostGR = new GlideRecord('cmdb_ci_lb_bigip');
hostGR.addQuery('virtual', false);
hostGR.addQuery('serial_number', current.serial_number);
hostGR.orderByDesc('last_discovered'); // In case of duplicates, find last discovered
hostGR.query();
if (hostGR.next()) {
new DiscoveryFunctions().createRelationshipIfNotExists(current.sys_id, hostGR.sys_id, "Virtualized by::Virtualizes");
}
})(current, previous);
In the above, the BR will only run for a vCMP (virtual). It will then look for a non-virtual F5 (host) with the same serial number and create the relationship.
I haven't tested any of this apart from the identification and a couple of manual inserts in the F5 table to check the business rule. But if you do try something similar, let me know how you get on. Or even better, if you know any OIDs we could query from the F5 MIB, even better!
Regards,
Dave
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-07-2017 09:20 AM
Thanks for the thorough reply David.
I experienced the identifier issue pretty quickly . I was planning on using IP and serial but haven't tried that yet. Maybe I will just stick to name since it worked for you.
Right now I'm just working on a discovery proof of concept. I will implement this once it gets funded (fingers crossed) and post the results. Also, I've sent the MIB question to our network engineer that manages our F5. I'm guessing he'll have to ask the vendor but if I get a response, I'll be sure to post it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-07-2017 09:27 AM
Hi Dan,
Be careful of IP and Serial Number because I have seen F5s discoverable from more than one IP and then discovery will update the IP address to the one it discovered on. IP/MAC on network adapter is certainly a possibility although I haven't looked at this for an F5.
Would be great to hear if you find anything else.
Regards,
Dave
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-14-2017 04:56 AM
Hi David,
I am running into the same problem, however we are using the F5 horizontal pattern for discovery.
As the BigIP table is extended from hardware the hardware rule is automatically enabled on the classification. Although I have been able to add an additonal rule matching only the name and serial number I am running into an error when running "missing Lookup Rule for 'cmdb_serial_number'"
After adding the lookup rule in my custom rule (the same as is being used in the hardware rule), and put an additional condition in it pointing to a dummy Configuration Item to prevent it from finding a match it runs. However, as it doesn't find a match the following hardware rules seems to execute afterwards. It will find the match (as the serial numbers are shared between the vCMP and physical hosts) and as a result the existing record is updated instead of a new record is being created.
To hopefully solve my problem I have a few basic questions to which I seek an answer:
1. Is it possible to run an identifier without the serial number, serial number type query.
2. is it possible to modify the triggered indentifier rules so in this particular case the hardware rule won't trigger after my new rule hasn't found a match. (disabling the hardware rule in the record disables it completely)
3. Am I presuming correctly all identifier rules are triggered up an until a match is found?
I am sorry if this sounds a bit messy, but after looking in the documentation and looking into some youtube video's I am still not certain how to proceed.
Regards,
Peter