Code Monkey home page Code Monkey logo

zas_agent's Introduction

zas_agent

Zabbix Agent Simulator

Please look at the PDF documentation in the ./doc directory

zas_agent's People

Contributors

alexanderzobnin avatar be-code avatar dependabot[bot] avatar vulogov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zas_agent's Issues

Multiple ZAS Agent instances

When I started several zas agent instances on one host with scenarios it uses the same redis instance, right? And data generated by agents are very similar (because it use the same data from redis). Can I use different redis stores for each agent?

ERROR: Problem handling request.

I started daemon by this commnad:
zas_agent.py --start --daemonize --listen 127.0.0.1 --port 10060 --redis_host 127.0.0.1 --redis_port 6379 --log '/var/log/zabbix/zas_agent.log'
and then trying to get value from agent:
zabbix_get -s 127.0.0.1 -p 10060 -k agent.ping
but can't get anymore. There is error in log:

INFO:root:Listening 127.0.0.1:10060
DEBUG:zas_server:listening
DEBUG:zas_server:Got connection
DEBUG:zas_server:Started process <Process(Process-1, started daemon)>
DEBUG:process-('127.0.0.1', 41173):Connected <socket._socketobject object at 0x27bf130> at ('127.0.0.1', 41173)
ERROR:process-('127.0.0.1', 41173):Problem handling request
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/zas_agent-0.1.1-py2.7.egg/EGG-INFO/scripts/zas_agent.py", line 268, in handle
  File "/usr/lib/python2.7/site-packages/zas_agent-0.1.1-py2.7.egg/EGG-INFO/scripts/zas_agent.py", line 190, in protocol_v1
TypeError: 'NoneType' object is not iterable
DEBUG:process-('127.0.0.1', 41173):Closing socket

When I'm started zas_agent without `--daemonize' it's returns values but I'm get this error in console:

DEBUG:zas_server:Started process <Process(Process-3, started daemon)>
DEBUG:process-('127.0.0.1', 40620):Connected <socket._socketobject object at 0x20eb1a0> at ('127.0.0.1', 40620)
ERROR:process-('127.0.0.1', 40620):Problem handling request
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/zas_agent-0.1.1-py2.7.egg/EGG-INFO/scripts/zas_agent.py", line 271, in handle
  File "/usr/lib/python2.7/site-packages/zas_agent-0.1.1-py2.7.egg/EGG-INFO/scripts/zas_agent.py", line 190, in protocol_v1
TypeError: 'NoneType' object is not iterable
DEBUG:process-('127.0.0.1', 40620):Closing socket

Can not install with latest python 2.7 docker image

I'm trying to put zas_agent into docker container and faced an issue. There's an error during installation, related to numpy (latest version required python 3.x). So a possible solution is restricting numpy version in setup.py.

Can't bind address in daemonize mode

When zas_agent is started normally all works fine. But if I try to start with --daemonize agent can't bind address. But procees is running:

[root@myhost zas_agent]# zas_agent.py --start --port 10060 --scenario '/etc/zas_scenario.cfg' --daemonize --pid '/tmp/zas_agent.pid' 
[root@myhost zas_agent]# netstat -lnt4
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State      
tcp        0      0 0.0.0.0:10050           0.0.0.0:*               LISTEN     
tcp        0      0 0.0.0.0:10051           0.0.0.0:*               LISTEN     
tcp        0      0 0.0.0.0:3306            0.0.0.0:*               LISTEN     
tcp        0      0 127.0.0.1:6379          0.0.0.0:*               LISTEN     
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN     
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN     
[root@myhost zas_agent]# ps -ely | grep zas
S   996 25866     1  0  80   0 10172 54132 skb_re ?        00:00:00 zas_agent.py

No handlers could be found for logger "zas_agent"

Hi!
I'm trying to run zas-agent in docker container, but get error:

root@6a6bc2d2dd98:/zas/zas_agent# zas_agent.py --start
No handlers could be found for logger "zas_agent"

Seems, it's problem with logging module, but I really don't understand why it causes only in docker.

Installation issue: can't copy 'doc/zas-agent.0.1.1.pdf'

Hi, Vladimir! Thanks for this great tool! I get error while installing zas_agent:
error: can't copy 'doc/zas-agent.0.1.1.pdf': doesn't exist or not a regular file
It's due in setup.py:

data_files=[
        ("/etc/zas", ['etc/network.scenario'],),
        ("/etc", ["etc/zas_scenario.cfg"]),
        ("/usr/share/zas_agent", ["doc/zas-agent.0.1.1.pdf",]),
...

, but real file name is doc/zas-agent-0.1.1.pdf.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.