5 changed files with 190 additions and 137 deletions
-
3.gitignore
-
4MANIFEST.in
-
137README.md
-
150README.rst
-
33setup.py
@ -1,3 +1,6 @@ |
|||
dist/ |
|||
build/ |
|||
*.egg-info/ |
|||
*.pyc |
|||
._* |
|||
*.sqlite3 |
|||
@ -0,0 +1,4 @@ |
|||
include LICENSE.md |
|||
include README.rst |
|||
recursive-include pydash/static * |
|||
recursive-include pydash/templates * |
|||
@ -1,137 +0,0 @@ |
|||
pyDash - v1.4.4 [](https://twitter.com/hostechs) [](http://www.linkedin.com/in/hostechs/) |
|||
====== |
|||
|
|||
|
|||
[](http://flattr.com/thing/2630601/k3onipydash-on-GitHub "Flattr this") |
|||
|
|||
|
|||
A reusable django app for monitoring your linux server. |
|||
|
|||
|
|||
Supported Python versions: |
|||
|
|||
- Python 2.x |
|||
|
|||
__[View Demo](http://pydash.hostechs.com/)__ |
|||
|
|||
user: admin |
|||
pass: admin |
|||
|
|||
|
|||
 |
|||
|
|||
|
|||
Installation |
|||
============ |
|||
|
|||
Clone the repository to your pc and copy the pydash folder to your django application. |
|||
|
|||
Make sure that ``django.contrib.auth`` is installed and working. |
|||
|
|||
Open your project's ``settings.py`` and add ``pydash`` to ``INSTALLED_APPS``: |
|||
|
|||
INSTALLED_APPS = ( |
|||
'pydash', |
|||
) |
|||
|
|||
Open your project's ``urls.py`` and include the ``pydash`` urls. |
|||
|
|||
urlpatterns = patterns('', |
|||
(r'^pydash/', include('pydash.urls')), |
|||
) |
|||
|
|||
Make sure ``AppDirectoriesFinder`` is enabled in your ``STATICFILES_FINDERS``: |
|||
|
|||
STATICFILES_FINDERS = ( |
|||
'django.contrib.staticfiles.finders.AppDirectoriesFinder', |
|||
) |
|||
|
|||
Before deploying to a live server, run the following command in order to collect the static files stored in pydash's directory: |
|||
|
|||
$ python manage.py collectstatic |
|||
|
|||
|
|||
Settings |
|||
======== |
|||
|
|||
There are 3 different refresh settings which are measured in `miliseconds`: |
|||
|
|||
TIME_JS_REFRESH = 30000 #30 seconds |
|||
TIME_JS_REFRESH_LONG = 120000 #120 seconds |
|||
TIME_JS_REFRESH_NET = 2000 #2 seconds |
|||
|
|||
If you wish to override the default settings, simply set those fields with the new values in your application's ``settings.py`` file. |
|||
|
|||
The refresh settings for each table are as follows: |
|||
|
|||
Memory Usage - TIME_JS_REFRESH |
|||
Load Average - TIME_JS_REFRESH |
|||
CPU Usage - TIME_JS_REFRESH |
|||
Traffic Usage - TIME_JS_REFRESH_NET |
|||
Disk Reads/Writes - TIME_JS_REFRESH_NET |
|||
Uptime - TIME_JS_REFRESH_LONG |
|||
Disk Usage - TIME_JS_REFRESH_LONG |
|||
Online Users - TIME_JS_REFRESH_LONG |
|||
Processes - TIME_JS_REFRESH_LONG |
|||
Netstat - TIME_JS_REFRESH_LONG |
|||
|
|||
|
|||
Remote data retrieval |
|||
===================== |
|||
|
|||
pyDash allows you to retrieve data remotely. |
|||
|
|||
Data is returned in JSON and can be easily retrieved as long as the user agent has been authenticated by the web application. For more information about how sessions are managed in Django, please click [here](https://docs.djangoproject.com/en/1.6/topics/http/sessions/). |
|||
|
|||
pyDash has a list of short URLs which you can use to retrieve the specific data: |
|||
|
|||
/info/uptime/ - Uptime |
|||
/info/platform/hostname/ - Hostname |
|||
/info/platform/osname/ - OS Name |
|||
/info/platform/kernel/ - Kernel |
|||
/info/getcpus/cpucount/ - Number of CPU cores |
|||
/info/getcpus/cputype/ - Type/Name of CPU |
|||
/info/memory/ - Memory Usage |
|||
/info/cpuusage/ - CPU Usage in percentage(%), free and used |
|||
/info/getdisk/ - Disk Usage |
|||
/info/getusers/ - Online Users |
|||
/info/getips/ - IP Addresses |
|||
/info/gettraffic/ - Internet Traffic |
|||
/info/getdiskio/ - Disk Reads/Writes |
|||
/info/proc/ - Running Processes |
|||
/info/loadaverage/ - Load Average |
|||
/info/getnetstat/ - Netstat |
|||
|
|||
To see the format of the JSON returned, you can access any of the URLs from your browser, e.g. `http://demo.pydash.net/info/uptime/` . |
|||
|
|||
|
|||
OS Support |
|||
========== |
|||
|
|||
pyDash was tested and runs under the following OSes: |
|||
|
|||
- Centos |
|||
- Fedora |
|||
- Ubuntu |
|||
- Debian |
|||
- Raspbian |
|||
- Pidora |
|||
- Arch Linux |
|||
|
|||
|
|||
It might work under others, but it hasn't been tested yet. |
|||
|
|||
|
|||
|
|||
License |
|||
======= |
|||
|
|||
**[MIT](https://github.com/k3oni/pydash-django-app/blob/master/LICENSE.md)** |
|||
|
|||
|
|||
|
|||
Credits |
|||
======= |
|||
[Dashboard Template](http://www.egrappler.com/templatevamp-free-twitter-bootstrap-admin-template/), |
|||
[Bootstrap](http://getbootstrap.com/), |
|||
[Font Awesome](http://fontawesome.io/) |
|||
@ -0,0 +1,150 @@ |
|||
pyDash - v1.4.4 |
|||
=============== |
|||
|
|||
A reusable django app for monitoring your linux server. |
|||
|
|||
Supported Python versions: |
|||
|
|||
- Python 2.x |
|||
|
|||
Requirements: |
|||
|
|||
- Django >= 1.5 |
|||
|
|||
|
|||
`View Demo <http://pydash.hostechs.com/>`_ |
|||
|
|||
:: |
|||
|
|||
user: admin |
|||
pass: admin |
|||
|
|||
|
|||
Installation |
|||
============ |
|||
|
|||
Clone the repository to your pc and, assuming that ``pip`` is installed, |
|||
run the following commands: |
|||
|
|||
- ``python setup.py sdist`` |
|||
- ``pip install dist/django-pydash-app-*.tar.gz`` |
|||
|
|||
Make sure that ``django.contrib.auth`` is installed and working. |
|||
|
|||
Open your project’s ``settings.py`` and add ``pydash`` to |
|||
``INSTALLED_APPS``: |
|||
|
|||
:: |
|||
|
|||
INSTALLED_APPS = ( |
|||
'pydash', |
|||
) |
|||
|
|||
Open your project’s ``urls.py`` and include the ``pydash`` urls. |
|||
|
|||
:: |
|||
|
|||
urlpatterns = patterns('', |
|||
(r'^pydash/', include('pydash.urls')), |
|||
) |
|||
|
|||
Make sure ``AppDirectoriesFinder`` is enabled in your |
|||
``STATICFILES_FINDERS``: |
|||
|
|||
:: |
|||
|
|||
STATICFILES_FINDERS = ( |
|||
'django.contrib.staticfiles.finders.AppDirectoriesFinder', |
|||
) |
|||
|
|||
Before deploying to a live server, run the following command in order to |
|||
collect the static files stored in pydash’s directory: |
|||
|
|||
:: |
|||
|
|||
$ python manage.py collectstatic |
|||
|
|||
Settings |
|||
======== |
|||
|
|||
There are 3 different refresh settings which are measured in |
|||
``miliseconds``: |
|||
|
|||
:: |
|||
|
|||
TIME_JS_REFRESH = 30000 #30 seconds |
|||
TIME_JS_REFRESH_LONG = 120000 #120 seconds |
|||
TIME_JS_REFRESH_NET = 2000 #2 seconds |
|||
|
|||
If you wish to override the default settings, simply set those fields |
|||
with the new values in your application’s ``settings.py`` file. |
|||
|
|||
The refresh settings for each table are as follows: |
|||
|
|||
:: |
|||
|
|||
Memory Usage - TIME_JS_REFRESH |
|||
Load Average - TIME_JS_REFRESH |
|||
CPU Usage - TIME_JS_REFRESH |
|||
Traffic Usage - TIME_JS_REFRESH_NET |
|||
Disk Reads/Writes - TIME_JS_REFRESH_NET |
|||
Uptime - TIME_JS_REFRESH_LONG |
|||
Disk Usage - TIME_JS_REFRESH_LONG |
|||
Online Users - TIME_JS_REFRESH_LONG |
|||
Processes - TIME_JS_REFRESH_LONG |
|||
Netstat - TIME_JS_REFRESH_LONG |
|||
|
|||
Remote data retrieval |
|||
===================== |
|||
|
|||
pyDash allows you to retrieve data remotely. |
|||
|
|||
Data is returned in JSON and can be easily retrieved as long as the user |
|||
agent has been authenticated by the web application. |
|||
|
|||
pyDash has a list of short URLs which you can use to retrieve the |
|||
specific data: |
|||
|
|||
:: |
|||
|
|||
/info/uptime/ - Uptime |
|||
/info/platform/hostname/ - Hostname |
|||
/info/platform/osname/ - OS Name |
|||
/info/platform/kernel/ - Kernel |
|||
/info/getcpus/cpucount/ - Number of CPU cores |
|||
/info/getcpu |
|||
|
|||
OS Support |
|||
========== |
|||
|
|||
pyDash was tested and runs under the following OSes: |
|||
|
|||
- Centos |
|||
- Fedora |
|||
- Ubuntu |
|||
- Debian |
|||
- Raspbian |
|||
- Pidora |
|||
- Arch Linux |
|||
|
|||
It might work under others, but it hasn’t been tested yet. |
|||
|
|||
Contributors |
|||
============ |
|||
|
|||
George Zografos - george.p.zografos@gmail.com |
|||
|
|||
License |
|||
======= |
|||
|
|||
`MIT <https://github.com/k3oni/pydash-django-app/blob/master/LICENSE.md>`_ |
|||
|
|||
Issues |
|||
====== |
|||
|
|||
Report any issues/bugs at `https://github.com/k3oni/pydash-django-app <https://github.com/k3oni/pydash-django-app>`_ |
|||
|
|||
Credits |
|||
======= |
|||
|
|||
`Dashboard Template <http://www.egrappler.com/templatevamp-free-twitter-bootstrap-admin-template/>`_, `Bootstrap <http://getbootstrap.com/>`_, `Font Awesome <http://fontawesome.io/>`_ |
|||
@ -0,0 +1,33 @@ |
|||
import os |
|||
from setuptools import setup |
|||
|
|||
README = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read() |
|||
|
|||
# allow setup.py to be run from any path |
|||
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) |
|||
|
|||
setup( |
|||
name='django-pydash-app', |
|||
version='1.4.4', |
|||
packages=['pydash'], |
|||
include_package_data=True, |
|||
license='MIT', |
|||
description='A reusable django app for monitoring your linux server.', |
|||
long_description=README, |
|||
url='https://github.com/k3oni/pydash-django-app', |
|||
author='Florian N.', |
|||
author_email='michaelneagu@gmail.com', |
|||
classifiers=[ |
|||
'Development Status :: 4 - Beta', |
|||
'Environment :: Web Environment' |
|||
'Framework :: Django', |
|||
'Intended Audience :: System Administrators', |
|||
'License :: OSI Approved :: MIT License', |
|||
'Operating System :: POSIX :: Linux', |
|||
'Programming Language :: Python', |
|||
'Programming Language :: Python :: 2.6', |
|||
'Programming Language :: Python :: 2.7', |
|||
'Topic :: Internet :: WWW/HTTP', |
|||
'Topic :: Internet :: WWW/HTTP :: Dynamic Content', |
|||
], |
|||
) |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue