Skip to content
This repository has been archived by the owner on Feb 9, 2024. It is now read-only.

Dog Push not working #19

Open
cagman opened this issue Aug 23, 2017 · 9 comments
Open

Dog Push not working #19

cagman opened this issue Aug 23, 2017 · 9 comments

Comments

@cagman
Copy link

cagman commented Aug 23, 2017

Hi ,

I'm currently having issues running dogpush diff/push. Im able to download the config and init a new alerts file, however when I add the 'rule_files' file name reference to the config.yaml, i get the following errors:

Traceback (most recent call last):
File "/usr/local/bin/dogpush", line 5, in
dogpush.main()
File "/Library/Python/2.7/site-packages/dogpush/dogpush.py", line 422, in main
args.command(args)
File "/Library/Python/2.7/site-packages/dogpush/dogpush.py", line 316, in command_diff
local_monitors = get_local_monitors()
File "/Library/Python/2.7/site-packages/dogpush/dogpush.py", line 186, in get_local_monitors
r = yaml.safe_load(f)
File "/Library/Python/2.7/site-packages/yaml/init.py", line 93, in safe_load
return load(stream, SafeLoader)
File "/Library/Python/2.7/site-packages/yaml/init.py", line 71, in load
return loader.get_single_data()
File "/Library/Python/2.7/site-packages/yaml/constructor.py", line 39, in get_single_data
return self.construct_document(node)
File "/Library/Python/2.7/site-packages/yaml/constructor.py", line 48, in construct_document
for dummy in generator:
File "/Library/Python/2.7/site-packages/yaml/constructor.py", line 398, in construct_yaml_map
value = self.construct_mapping(node)
File "/Library/Python/2.7/site-packages/yaml/constructor.py", line 208, in construct_mapping
return BaseConstructor.construct_mapping(self, node, deep=deep)
File "/Library/Python/2.7/site-packages/yaml/constructor.py", line 133, in construct_mapping
value = self.construct_object(value_node, deep=deep)
File "/Library/Python/2.7/site-packages/yaml/constructor.py", line 88, in construct_object
data = constructor(self, node)
File "/Library/Python/2.7/site-packages/yaml/constructor.py", line 414, in construct_undefined
node.start_mark)
yaml.constructor.ConstructorError: could not determine a constructor for the tag 'tag:yaml.org,2002:python/unicode'
in "/Users/cgerasimou/dogpush/animus_monitors.yaml", line 15, column 25

Can you please advise if i'm doing something wrong

@brownjohnf
Copy link

I'm experiencing something similar, and it appears to be a problem with dogpush outputting

options:
    escalation_message: !!python/unicode ''

into the monitors YAML. I'm not sure what caused this to start happening.

@cagman
Copy link
Author

cagman commented Aug 23, 2017

To add some further information, i was was running Dog Push off MacOS Sierra. As a work around, I was able to spin a Centos instance on AWS and it worked without issue.

@cfstout
Copy link

cfstout commented Sep 1, 2017

FWIW I saw the same issues, looks to be a python to yaml serialization problem or something. Simply removing the !!python/unicode part and just leaving the empty string worked for me.

@brownjohnf
Copy link

Yeah, removing the string works, until you pull down active monitors again and it adds that string back into the YAML.

@ewhauser
Copy link

I was able to fix this by changing:

yaml.dump(d, width=CONFIG['dogpush']['yaml_width']), flags=re.M)

From yaml.dump to yaml.safe_dump

@cagman
Copy link
Author

cagman commented Sep 25, 2017

Confirmed that fix worked. Thanks @ewhauser

@bit-herder
Copy link

can we get this merged? this essentially makes this software unusable. did the dev abandon this?

@cfstout
Copy link

cfstout commented Jun 6, 2018

Last commit on this project was Oct 31, 2017. Looks to be dead. There's a more active fork https://github.com/dronedeploy/DogPush, I can try to PR my fix there..?

@ewhauser
Copy link

ewhauser commented Jun 6, 2018

That's our fork. If you submit a PR, we will merge it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants