Skip to content

Conversation

@rauhmaru
Copy link

34 to 41: The source type (chat or private) does not matter anymore. The value is retrieved in both types.
46 to 52: The way to get the chat_id has been simplified, and the uids.txt file, no longer chat or private value.
66 to 68: Simplified the code to set the value of the variable.

Unfortunately I could not perform all the tests that you would like to validate the changes, but the tests I conducted in my laboratory, worked well.
I hope it works for you too. :)

@ekbfh
Copy link

ekbfh commented Dec 20, 2015

zbxtg.sh: line 39: unexpected EOF while looking for matching `)'
You miss the ).
With ) it works perfect.

@rauhmaru
Copy link
Author

Ouuch! Yes, Indeed, I forgot: D

@ekbfh
Copy link

ekbfh commented Dec 20, 2015

did u try it on zabbix 3.0?

@rauhmaru
Copy link
Author

Not yet, but I can do it tomorrow.
I've been thinking .... We can do that by default it sends text messages, and, through a telegram command, it sends the graphics. What do you think?

@ekbfh
Copy link

ekbfh commented Dec 21, 2015

I have some difficulties with 3.0. And i'm trying to solve them now.
i was thinking, that if we haven't write ;graph, it will use method txt by default.

Remove variable PERIOD in line 54 (unnecessary)
Update in PERIOD variable
@ableev
Copy link
Owner

ableev commented Jan 4, 2016

@rauhmaru hey, i just write the same code on python, because it is too hard to support all versions of curl/wget/etc.

@ableev
Copy link
Owner

ableev commented Jan 11, 2016

@rauhmaru I've checked your code.
I don't agree with removing types of chat.
Because you need to get chat_id from "username" field in case of it's person and from "title" in case of group chats, check the new python code:

...
                    if chat["username"] == zbx_to:
                        uid = chat["id"]
...
                    if chat["title"] == zbx_to:
                        uid = chat["id"]
...

How do you supposed to make difference between 1-to-1 and group chat?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants