mirror of
https://github.com/nicolargo/glances.git
synced 2024-11-28 05:42:57 +03:00
Merge pull request #1402 from EmilienMottet/develop
fix tablename cassandra export and variabilize the cassandra table-name
This commit is contained in:
commit
871a0d1405
@ -115,11 +115,11 @@ class Export(GlancesExport):
|
||||
|
||||
# Write input to the Cassandra table
|
||||
try:
|
||||
|
||||
stmt = "INSERT INTO {} (plugin, time, stat) VALUES (?, ?, ?)".format(self.table)
|
||||
query = self.session.prepare(stmt)
|
||||
self.session.execute(
|
||||
"""
|
||||
INSERT INTO localhost (plugin, time, stat)
|
||||
VALUES (%s, %s, %s)
|
||||
""",
|
||||
query,
|
||||
(name, uuid_from_time(datetime.now()), data)
|
||||
)
|
||||
except Exception as e:
|
||||
|
Loading…
Reference in New Issue
Block a user