mirror of
https://github.com/nicolargo/glances.git
synced 2024-11-30 21:49:37 +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
|
# Write input to the Cassandra table
|
||||||
try:
|
try:
|
||||||
|
|
||||||
|
stmt = "INSERT INTO {} (plugin, time, stat) VALUES (?, ?, ?)".format(self.table)
|
||||||
|
query = self.session.prepare(stmt)
|
||||||
self.session.execute(
|
self.session.execute(
|
||||||
"""
|
query,
|
||||||
INSERT INTO localhost (plugin, time, stat)
|
|
||||||
VALUES (%s, %s, %s)
|
|
||||||
""",
|
|
||||||
(name, uuid_from_time(datetime.now()), data)
|
(name, uuid_from_time(datetime.now()), data)
|
||||||
)
|
)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
Loading…
Reference in New Issue
Block a user