Skip to content

Commit 7de8157

Browse files
committed
Fixed non-alignment with recent API changes: e.json -> e:json()
1 parent 2867d5b commit 7de8157

File tree

7 files changed

+10
-7
lines changed

7 files changed

+10
-7
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
.dirstamp
12
*.o
23
*.lo
34
*.swp

config/amqp-topic.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ local submit = function(obs)
104104
end
105105

106106
observer.event = function(e)
107-
data = e.json
107+
data = e:json()
108108
submit(data)
109109
end
110110

config/pulsar.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ local submit = function(obs)
122122
end
123123

124124
observer.event = function(e)
125-
submit(e.json)
125+
submit(e:json())
126126
end
127127

128128
-- Initialise

config/redis.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ end
6262

6363
-- Call the JSON functions for all observer functions.
6464
observer.event = function(e)
65-
submit(e.json)
65+
submit(e:json())
6666
end
6767

6868
-- Initialise

config/zeromq.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ end
6666

6767
-- Call the JSON functions for all observer functions.
6868
observer.event = function(e)
69-
submit(e.json)
69+
submit(e:json())
7070
end
7171

7272
-- Initialise

subscribers/cybermon-elasticsearch

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,6 @@ def init():
315315
def es_output(obs, id):
316316

317317
u = "%s%s/_doc/%s" % (es_url, es_index, id)
318-
print(u)
319318

320319
r = requests.put(u, data=json.dumps(obs),
321320
headers={"Content-Type": "application/json"})
@@ -336,7 +335,10 @@ def handle(msg, output):
336335
ob["id"] = ev["id"]
337336
ob["action"] = ev["action"]
338337
ob["device"] = ev["device"]
339-
ob["network"] = ev["network"]
338+
try:
339+
ob["network"] = ev["network"]
340+
except:
341+
pass
340342
ob["time"] = ev["time"]
341343
if "url" in ev: ob["url"] = ev["url"]
342344
if "location" in ev: ob["location"] = ev["location"]

subscribers/cybermon-gaffer

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ def handle(msg, output):
175175
add_edge(edges, "udpflow", src, dest)
176176

177177
if obj["action"] == "dns_message" and "query" in obj["dns_message"]:
178-
for v in ev["dns_message"]["query"]:
178+
for v in obj["dns_message"]["query"]:
179179
if "name" in v:
180180
add_edge(edges, "dnsrequest", src, v["name"])
181181

0 commit comments

Comments
 (0)