icoz / pysymo Goto Github PK
View Code? Open in Web Editor NEWsyslog-ng mongodb analyzer
License: GNU General Public License v2.0
syslog-ng mongodb analyzer
License: GNU General Public License v2.0
tools/initdb.py => tools/init_db.py
если я запускаю из корневой папки pysymo:
python tools/init_medb.py
получаю ошибку:
OK: Collection 'medb' and indexes were created in 'rsyslog' database
OK: Now load medb into 'rsyslog' database
unzip: cannot find or open ../data/medb.zip, ../data/medb.zip.zip or ../data/medb.zip.ZIP.
Traceback (most recent call last):
File "tools/init_medb.py", line 45, in <module>
main()
File "tools/init_medb.py", line 32, in main
f = open('medb.txt', 'r')
IOError: [Errno 2] No such file or directory: 'medb.txt'
отсутствует пример задач cron
было бы не плохо показать как часто запускать обработку с точки зрения разработчика.
Хорошо добавить пример запуска логгера из под apache с модулем mod_wsgi
pysymo.conf (Apache >= 2.0)
<VirtualHost *:80>
ServerName pysymo.example.com
WSGIScriptReloading On
WSGIScriptAlias / /opt/pysymo/apache.wsgi
<Directory /opt/pysymo/app/>
Order allow,deny
Allow from all
</Directory>
Alias /static /opt/pysymo/app/static
<Directory /opt/pysymo/app/static/>
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
apache.wsgi:
#!/usr/bin/python
import sys
sys.path.insert(0,"/opt/pysymo/")
from app import app as application
application.secret_key = 'some_super_secret_key'
Это мой рабочий вариант.
в корне проекта можно создать файл requirements.txt с содержимым:
Flask
Flask-WTF
Jinja2
WTForms
pymongo
flup
flask-paginate
flask-login
pycrypto
python-ldap
Babel
Flask-Babel
и ставить все вместе одной командой pip install -r requirements.txt
Для незнающих питон это поможет, только указать что должен стоять в системе pip.
Please create requirements.txt for best praticle in install! Thx!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.