This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MATCH (u:User)-[r:AdminTo|MemberOf*1..]->(c:Computer | |
RETURN u.name | |
That’ll return a list of users who have admin rights on at least one system either explicitly or through group membership | |
--------------- | |
MATCH | |
(U:User)-[r:MemberOf|:AdminTo*1..]->(C:Computer) | |
WITH | |
U.name as n, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Custom script to install Telegraf | |
# telegraf user | |
sudo useradd -s /bin/false telegraf | |
# Create the systemd directory. | |
# | |
# .conf files in this directory will override the default configuration. | |
# You should include such a file in the boot script for a given instance. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from python_rules import Rule, deep_get | |
import rapidjson | |
def original_get(e, key='event.original', default=None): | |
# used to return event.original field, deserialized into dictionary | |
# if key not found, we return empty dict | |
nested = deep_get(e, *key.split('.')) | |
if nested is None: | |
return default |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from python_rules import Rule, deep_get | |
import rapidjson | |
def original_get(e, key='event.original', default=None): | |
# used to return event.original field, deserialized into dictionary | |
# if key not found, we return empty dict | |
nested = deep_get(e, *key.split('.')) | |
if nested is None: | |
return default | |
try: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from python_rules import Rule, deep_get | |
import rapidjson | |
def original_get(e, key='event.original', default=None): | |
# used to return event.original field, deserialized into dictionary | |
# if key not found, we return empty dict | |
nested = deep_get(e, *key.split('.')) | |
if nested is None: | |
return default |