decoupca / pysolarwinds Goto Github PK
View Code? Open in Web Editor NEWA modern Python API for the SolarWinds Information Service (SWIS)
A modern Python API for the SolarWinds Information Service (SWIS)
Now that OrionInterface
inherits from NewEndpoint
, we need to implement all available attributes and methods. Sample data dump:
{
'AdminStatus': 1,
'AdminStatusLED': 'Up.gif ',
'Alias': '',
'AncestorDetailsUrls': [
'/Orion/View.aspx?NetObject=I:5509',
'/Orion/NetPerfMon/NodeDetails.aspx?NetObject=N:1750'
],
'AncestorDisplayNames': ['Tunnel1001 - Tu1001', 'RALH00MA01'],
'Bps': 194808.813,
'CRCAlignErrorsThisHour': 0.0,
'CRCAlignErrorsToday': 0.0,
'Caption': 'Tunnel1001 - Tu1001',
'Counter64': 'Y',
'CustomBandwidth': False,
'CustomPollerLastStatisticsPoll': '1899-12-30T04:00:00',
'Description': '',
'DetailsUrl': '/Orion/View.aspx?NetObject=I:5509',
'DisplayName': 'Tunnel1001 - Tu1001',
'DuplexMode': 0,
'FullName': 'RALH00MA01 - Tunnel1001 - Tu1001',
'HasObsoleteData': 0,
'Icon': '131.gif ',
'IfName': 'Tu1001',
'Image': None,
'InBandwidth': 100000.0,
'InDiscardsThisHour': 0.0,
'InDiscardsToday': 0.0,
'InErrorsThisHour': 0.0,
'InErrorsToday': 0.0,
'InMcastPps': 0.0,
'InPercentUtil': 96.0,
'InPktSize': 261,
'InPps': 651.525269,
'InUcastPps': 651.525269,
'Inbps': 96411.5,
'Index': 40,
'InstanceSiteId': 0,
'InstanceType': 'Orion.NPM.Interfaces',
'InterfaceAlias': '',
'InterfaceCaption': 'Tunnel1001 - Tu1001',
'InterfaceID': 5509,
'InterfaceIcon': '131.gif ',
'InterfaceIndex': 40,
'InterfaceLastChange': '2023-03-17T10:06:00',
'InterfaceMTU': 9922,
'InterfaceName': 'Tunnel1001',
'InterfaceResponding': 1,
'InterfaceSpeed': 100000.0,
'InterfaceSubType': 0,
'InterfaceType': 131,
'InterfaceTypeDescription': '',
'InterfaceTypeName': '',
'LastChange': '2023-03-17T14:06:00',
'LastSync': '2023-03-20T18:15:57.127',
'LateCollisionsThisHour': 0.0,
'LateCollisionsToday': 0.0,
'MAC': '',
'MTU': 9922,
'MaxInBpsTime': '2022-09-18T23:17:12.463',
'MaxInBpsToday': 0.0,
'MaxOutBpsTime': '2023-03-16T04:40:34.62',
'MaxOutBpsToday': 0.0,
'MinutesSinceLastSync': 1,
'Name': 'Tunnel1001',
'NextPoll': '2023-03-20T18:16:52.427',
'NextRediscovery': '2023-03-20T18:45:52.613',
'NodeID': 1750,
'ObjectSubType': 'SNMP',
'ObsoleteDataCurrentSettingValue': 3,
'ObsoleteDataFeatureStatus': 1,
'OperStatus': 1,
'OperStatusLED': 'Up.gif ',
'OrionIdColumn': 'InterfaceID',
'OrionIdPrefix': 'I:',
'OutBandwidth': 100000.0,
'OutDiscardsThisHour': 0.0,
'OutDiscardsToday': 0.0,
'OutErrorsThisHour': 0.0,
'OutErrorsToday': 0.0,
'OutMcastPps': 0.0,
'OutPercentUtil': 98.0,
'OutPktSize': 99,
'OutPps': 140.760849,
'OutUcastPps': 140.760849,
'Outbps': 98397.31,
'PercentUtil': 97.0,
'PhysicalAddress': '',
'PollInterval': 120,
'RediscoveryInterval': 30,
'Severity': 0,
'SkippedPollingCycles': 0,
'Speed': 100000.0,
'StatCollection': 9,
'Status': 1,
'StatusDescription': 'Up',
'StatusIcon': 'Up.gif ',
'StatusIconHint': None,
'StatusLED': 'Up.gif ',
'Type': 131,
'TypeDescription': '',
'TypeName': '',
'UnManageFrom': None,
'UnManageUntil': None,
'UnManaged': False,
'UnPluggable': False,
'Uri': 'swis://PTC-WBSOLARW702.ad.moodys.net/Orion/Orion.Nodes/NodeID=1750/Interfaces/InterfaceID=5509'
}
All available node properties, as returned by swisclient.read()
, should be exposed as appropriately-typed properties in OrionNode
objects.
{
'AgentPort': 161,
'Allow64BitCounters': True,
'AncestorDetailsUrls': ['/Orion/NetPerfMon/NodeDetails.aspx?NetObject=N:275'],
'AncestorDisplayNames': ['RBFS00CR01'],
'AvgResponseTime': 303,
'BlockUntil': '1899-12-30T05:00:00',
'BufferBgMissThisHour': -2.0,
'BufferBgMissToday': -2.0,
'BufferHgMissThisHour': -2.0,
'BufferHgMissToday': -2.0,
'BufferLgMissThisHour': -2.0,
'BufferLgMissToday': -2.0,
'BufferMdMissThisHour': -2.0,
'BufferMdMissToday': -2.0,
'BufferNoMemThisHour': -2.0,
'BufferNoMemToday': -2.0,
'BufferSmMissThisHour': -2.0,
'BufferSmMissToday': -2.0,
'CMTS': 'N',
'CPUCount': 2,
'CPULoad': 1,
'Caption': 'RBFS00CR01',
'Category': 1,
'ChildStatus': 1,
'Community': '3!3ph4n!',
'Contact': 'Moodys-NetworkEngineering',
'CustomPollerLastStatisticsPoll': '1899-12-30T05:00:00',
'CustomPollerLastStatisticsPollSuccess': '1899-12-30T05:00:00',
'CustomStatus': False,
'DNS': '',
'Description': 'Juniper Networks, Inc.',
'DetailsUrl': '/Orion/NetPerfMon/NodeDetails.aspx?NetObject=N:275',
'DisplayName': 'RBFS00CR01',
'DynamicIP': False,
'EngineID': 1,
'EntityType': 'Orion.Nodes',
'External': False,
'GroupStatus': 'Up.gif ',
'IOSImage': '',
'IOSVersion': '',
'IP': '172.25.174.1',
'IPAddress': '172.25.174.1',
'IPAddressGUID': '01ae19ac-0000-0000-0000-000000000000',
'IPAddressType': 'IPv4',
'IP_Address': '172.25.174.1',
'Icon': '2636.gif ',
'Image': None,
'InstanceSiteId': 0,
'InstanceType': 'Orion.Nodes',
'IsOrionServer': False,
'IsServer': False,
'LastBoot': '2022-10-20T13:06:00',
'LastSync': '2023-03-06T16:53:23.853',
'LastSystemUpTimePollUtc': '2023-03-06T16:52:15.997Z',
'LoadAverage1': None,
'LoadAverage15': None,
'LoadAverage5': None,
'Location': 'Sify ?? - Noida',
'MachineType': 'Juniper Networks, Inc.',
'MaxResponseTime': 304,
'MemoryAvailable': 3157052160.0,
'MemoryUsed': 890450752.0,
'MinResponseTime': 303,
'MinutesSinceLastSync': 0,
'NextPoll': '2023-03-06T16:53:24.25',
'NextRediscovery': '2023-03-06T17:15:40.87',
'NodeDescription': 'RBFS00CR01',
'NodeID': 275,
'NodeName': 'RBFS00CR01',
'NodeStatusRootCause': '',
'NodeStatusRootCauseWithLinks': '',
'ObjectSubType': 'SNMP',
'OrionIdColumn': 'NodeID',
'OrionIdPrefix': 'N:',
'PercentLoss': 0.0,
'PercentMemoryAvailable': 78,
'PercentMemoryUsed': 22,
'PollInterval': 120,
'PolledStatus': 1,
'RWCommunity': '',
'RediscoveryInterval': 30,
'ResponseTime': 304,
'SNMPVersion': 2,
'Severity': 0,
'SkippedPollingCycles': 0,
'StatCollection': 5,
'Status': 1,
'StatusDescription': 'Node status is Up.',
'StatusIcon': 'Up.gif ',
'StatusIconHint': None,
'StatusLED': 'Up.gif ',
'SysName': 'SNMP-RO',
'SysObjectID': '1.3.6.1.4.1.2636.1.1.1.4.82.30',
'SystemUpTime': 11853926.0,
'TotalMemory': 4047503360.0,
'UiSeverity': 0,
'UnManageFrom': '2023-02-16T17:54:26.643Z',
'UnManageUntil': '2023-02-16T18:09:26.643Z',
'UnManaged': False,
'Uri': 'swis://ptc-wbswdev201.ad.moodys.net/Orion/Orion.Nodes/NodeID=275',
'Vendor': 'Juniper Networks, Inc.',
'VendorIcon': '2636.gif '
}
The API
class, and subsequent self.api
references, are not as semantic as SWISClient
and swis
, respectively. Also, users of OrionSDK
are already familiar with the SwisClient
nomenclature, which will make this module more discoverable.
As we move from the old Endpoint
base class to NewEndpoint
base class, the OrionInterface
class is a good candidate for migration. This will prepare it for further enhancements.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.