rvojcik / rt-server-client Goto Github PK
View Code? Open in Web Editor NEWServer discovery client for RackTables project. Do automatic server discovery and send information to racktables database.
License: GNU General Public License v3.0
Server discovery client for RackTables project. Do automatic server discovery and send information to racktables database.
License: GNU General Public License v3.0
SW Type never is updated on ubuntu servers, I will debug to figure out the issue but I believe it has to do with os_codename as the query rather than os_version. I switch that but get a database duplicate error if the SW Type is set and a constraint error if it does not.
By dafault many attributes missing in database. We need to be able to add them automaticly.
Hello!
We are using Ubuntu on proxmox virtualization. And now we want to collect information from out infrastructure to racktables with auto-discovery.
When i started system-info, i got error:
# system-info -d [DEBUG] Opening config: /etc/rt-server-client/main.conf [DEBUG] Database connection [host, port, passwd, database, user] = [ maria01, 3306, xxxxxx, racktables, racktables ] [DEBUG] Initializing RT Api object [DEBUG] Device list: ['eth0'] [DEBUG] Processing interface eth0 [DEBUG] IPv4: [['172.10.11.213']] [DEBUG] IPv6: [[]] [DEBUG] Connection: ['', ''] /bin/sh: 1: omreport: not found /bin/sh: 1: ipmitool: not found [DEBUG] Drac IP: [DEBUG] Product name: Standard PC (i440FX + PIIX, 1996) [DEBUG] Service Tag: Not [DEBUG] Vendor: QEMU Traceback (most recent call last): File "/usr/local/bin/system-info", line 142, in <module> server_object.DiscoverAll() File "/usr/local/lib/python3.6/dist-packages/rt_server_client/sysinfo/__init__.py", line 64, in DiscoverAll self.DiscoverSystem() File "/usr/local/lib/python3.6/dist-packages/rt_server_client/sysinfo/__init__.py", line 153, in DiscoverSystem elif vendor == 'QEMU': NameError: name 'vendor' is not defined
What's wrong? There are not omreport and ipmi and can't be.
Hi,
I have installed freebsd where racktables is running and i want to use your Automatic server audit for RackTables project but do I need the lab-release ?
When running the script after the initial installation on a host (which is already in the object list), I'm getting the following error:
Hostname racktablespc already exist. I'm using service tag: ERROR: Problem during executing dmidecode
[DEBUG] Inserting CPU attribute information
Traceback (most recent call last):
File "./system-info.py", line 419, in
rtobject.InsertAttribute(object_id,server_type_id,rtobject.GetAttributeId("CPUs Logical"),"NULL",cpu_logical_num,hostname)
File "/usr/lib/python2.7/site-packages/rtapi/init.py", line 353, in InsertAttribute
self.db_insert(sql)
File "/usr/lib/python2.7/site-packages/rtapi/init.py", line 77, in db_insert
self.dbresult.execute(sql)
File "/usr/lib64/python2.7/site-packages/MySQLdb/cursors.py", line 205, in execute
self.errorhandler(self, exc, value)
File "/usr/lib64/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
raise errorclass, errorvalue
_mysql_exceptions.IntegrityError: (1452, 'Cannot add or update a child row: a foreign key constraint fails (inventor_rt
.AttributeValue
, CONSTRAINT AttributeValue-FK-map
FOREIGN KEY (object_tid
, attr_id
) REFERENCES AttributeMap
(objtype_id
, attr_id
))')
RackTables 0.20.11
root@test:/opt/test1/test_build# ./system-info.py
Traceback (most recent call last):
File "./system-info.py", line 399, in
rtobject.InsertAttribute(object_id,server_type_id,rtobject.GetAttributeId("CPU Model"),cpu_model_name,"NULL",hostname)
File "./lib/rtapi/init.py", line 203, in InsertAttribute
sql = "SELECT string_value,uint_value FROM AttributeValue WHERE object_id = %d AND object_tid = %d AND attr_id = %d" % (object_id, object_tid, attr_id)
TypeError: %d format: a number is required, not NoneType
I have adjusted the config accordingly, something I am missing?
Hey,
I'm running RackTables 20.14 on CentOS 7.
When running ./system-info.py I get the following (anonymized) output:
Hostname server.domain.de already exist. I'm using service tag: sh: /opt/server-audit/get-bios-ident.py: No such file or directory
I couldn't find any reference to get-bios-ident.py on the internet except in your code here.
Where can I get that?
Hi,
I get SyntaxError: invalid syntax when i try to run System-info.py
Thank you.
File "./system-info.py", line 212
elif line.find('lldp.'+interface+'.port.descr') > -1:
^
SyntaxError: invalid syntax
Add support for KVM virtualization.
Hypervisor detection and guest os.
Optimize code especialy in Insert/Update branches of the main loop.
Redisign repository and sw to use python-pip package system.
Adding Support for python3
Hi there,
your project seems to be a very useful addition to racktables. Unfortunately, i can't get it to work on Ubuntu 16.04 because it can't import something named "base" from the ToolBox folder:
:/opt/rt-server-client$ ./system-info.py
Traceback (most recent call last):
File "./system-info.py", line 66, in
from ToolBox import net, dell, base
ImportError: cannot import name base
:/opt/rt-server-client/lib/ToolBox$ ll
total 20
drwxr-xr-x 4 root root 4096 Mar 15 16:28 ./
drwxr-xr-x 4 root root 4096 Mar 15 16:13 ../
drwxr-xr-x 2 root root 4096 Mar 15 16:26 dell/
-rw-r--r-- 1 root root 191 Mar 15 16:13 init.py
drwxr-xr-x 2 root root 4096 Mar 15 16:13 net/
any advise on that?
best,
Basti
Hello, at the time of running the script I get the message:
Traceback (most recent call last):
File "./system-info.py", line 200, in
if init_run == "yes":
NameError: name 'init_run' is not defined
When running python system-info.py it throws an exception about ToolBox:
Traceback (most recent call last):
File "system-info.py", line 66, in
from ToolBox import net, dell
ImportError: No module named ToolBox
for some reason this package isn't in pip / yum
OS CentOS Linux release 7.2.1511 (Core)
Python version 2.7.5
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.