Comments (15)
@tgupta3 i highly recommend you join the SuzieQ slack. Interactions can be much faster plus others will pitch in.
from suzieq.
Thank you for the suggestion @netgun . This is very useful, no doubt. But this will be a massive effort, as I see it. We have to acquaint ourselves with VMWare API, which we have no way to test, as we can't purchase VMW products :).
What help can you provide us?
from suzieq.
I'm happy to take this as we already have a lot of VMware deployments with & without NSX that I can use to test the code. In return, it would also be beneficial for us to observe the lifecycle of a VM.
Are we just looking to discover what vms are connected to which dvs and which portgroup ?
from suzieq.
What do you mean by "'m happy to take this on", @tgupta3 ?
from suzieq.
@ddutt I meant I can implement this.
from suzieq.
I am happy to help with anything that I can. I am not a developer but can help with things like docs and can even try to get technical questions answered by the developers.
Docs are here https://developer.vmware.com/apis
from suzieq.
Fantastic @tgupta3 , happy to help you with this. @netgun if you can help test, that'd be great.
First thing we need to do is define what is the information we want to save.
from suzieq.
IMO from troubleshooting point of view two things are very useful
- If a VM existed at a point in time and if it was which segment and DVS it was on and also the vcenter it was on ?
- The discovered IP for that VM, and maybe other metadata like creation date and template.
from suzieq.
@tgupta3 So, what API calls are necessary for each? Whats the output of each of those API calls? We can start there
from suzieq.
I think this is a good example. It would look very similiar except use content.viewManager.CreateContainerView
on vim.DistributedVirtualSwitch
.
Once you have all the DVS, it's just a couple of for loops to iterate over the portgroups and then vms to get individual vm.
The metadata from the vm can be extracted using the objects defined here . I think the discovered ip address is available in vim.vm.Summary.GuestSummary)
but I will have to double check.
from suzieq.
Can you put together a list of fields you'll capture, @tgupta3 ?
from suzieq.
I think 2 tables would be a good starting point
- VMs
- VM ID: Unique identifier for the VM (this is mostly useful for log analysis)
- VM Name: Name of the VM.
- VM State: Current state of the VM denoted as ENUM
- Host ID: Identifier of the host machine on which the VM is running.
- Operating System: OS installed
- CPU Allocation: CPU specs
- Memory Allocation: Memory specs
- Creation Date: Date and time when the VM was created.
- VM interfaces
- Interface ID: Identifer of the interface
- VM ID: Identifier of the VM
- MAC Address: MAC address
- IP Address(es): IP address(es) associated with the network interface.
- Connected Port ID: Identifier of the port on the virtual switch to which this interface is connected.
- DVS: Name or ID of the DVS
- Status: Operational status
I think with this information, we would be able to construct what the state of the environment looked like. Do you think we would be able to extend it to talk to the network device information to trace the path end to end rather than just terminating on the port of the TOR ?
from suzieq.
@ddutt Can you help me out a bit with how to structure. I was able to write the base layer code to connect and fetch data from vcenter, but i'm having issues on how to fetch data for each vm. I noticed in the `suzieq/config/*.yaml, usually the commands given fetches all data. However in the case of vcenter, it's a two step process
- Get all Vms list
- Get details about those vms or do a for each.
The API is documented here
Is there an example I can refer to that would help me with this ?
from suzieq.
@tgupta3 IMO, vCenter needs to be treated as an inventory source which is polled for a list of VMs and their IPs, and then you poll each VM like you would a server. Does this make sense? Look at the netbox code (suzieq/poller/controller/source/netbox.py) for modelling vCenter as an inventory source. each VM will then show up as a device under device table, with interfaces, addresses and such. Does this make sense?
from suzieq.
Great, that's a good idea. Let me go through that, will reach out if I run into issues.
from suzieq.
Related Issues (20)
- [Feature]: Remove Architecture Column from device show output and add Serial Number
- [Feature]: errDisabled count ports in interface summarize
- [Feature]: show current suzieq data-dir and settings
- [Bug]: suzieq installed in pipx virtualenv using python3.8,python3.9 stating missing import uvloop HOT 1
- [Docs]: FileSystem stated as supported for nxos, textfsm config file is not configured for nxos HOT 2
- [Feature]: Route Summarization included in Route Summary
- [Bug]: _clean_junos_data throws AttributeError: 'list' object has no attribute 'lower'
- [Bug]: _clean_junos_data KeyError: 'bootupTimestamp'
- [Bug]: Trace page return abolute url in stead of relative on trace images
- [Bug]: Device status dead if Cisco IOS exec-timeout configured with lower value than SuzieQ polling period
- [Bug]: Cisco device parsing fails if hashes are in the login banner
- [Feature]: Define a specific ssh config file
- [Feature]: To support defining SuzieQ REST API parameters as environment variables when using SuzieQ Python API SDK
- [Feature]: custom netbox queries / add nautobot 2.X support
- [Feature]: Kubernetes overlay tracking with CNI's like Cillium, Flannel, Calico HOT 1
- [Bug]: sq-poller results in " Unable to determine device type" for Juniper devices
- [Bug]: Python API with namespace parameter
- [Bug]: AttributeError: 'DataFrame' object has no attribute 'ifState' when loading default dashboard HOT 1
- [Feature]: Cisco NX-OS: consider xcvr interfaces down instead of not connected HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from suzieq.