Giter Club home page Giter Club logo

Comments (29)

martinrusev avatar martinrusev commented on August 17, 2024

That's strange.
Is /home/thomas/.Private a separate partition?

from amon.

tsileo avatar tsileo commented on August 17, 2024

Here is the result of $ df -h on my server:

Sys. de fichiers            Taille  Uti. Disp. Uti% Monté sur
/dev/sda1              92G  6,8G   81G   8% /
none                  991M  220K  991M   1% /dev
none                 1000M  4,0K 1000M   1% /dev/shm
none                 1000M   92K  999M   1% /var/run
none                 1000M     0 1000M   0% /var/lock
/dev/sdb1             459G   83G  353G  19% /backups
/dev/sda6             365G  9,5G  337G   3% /home
/home/thomas/.Private
                      365G  9,5G  337G   3% /home/thomas

Also, the system page doesn't get updated at all but no error is throwed.

Maybe just stripping the dot in the name should resolve the bug ?

from amon.

martinrusev avatar martinrusev commented on August 17, 2024

Yeah, that's how the charts library is behaving - if there is an error, it doesn't displays the charts and that's all.
I will see what I can do about the .

from amon.

martinrusev avatar martinrusev commented on August 17, 2024

Can you update Amon and tell me what's happening

from amon.

tsileo avatar tsileo commented on August 17, 2024

I get this error on the dashboard, nothing in amond.log, all the charts seems to work except my /home/thomas/.Private partition ( and maybe the cpu but i'm not sure)

Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/tornado-2.1.1-py2.7.egg/tornado/web.py", line 954, in _execute getattr(self, self.request.method.lower())(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/amon-0.6_dev-py2.7.egg/amon/web/views.py", line 72, in get unread_values=self.unread_values File "/usr/local/lib/python2.7/dist-packages/amon-0.6_dev-py2.7.egg/amon/web/template.py", line 246, in render return template.render(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/jinja2/environment.py", line 894, in render return self.environment.handle_exception(exc_info, True) File "/usr/local/lib/python2.7/dist-packages/amon-0.6_dev-py2.7.egg/amon/web/templates/dashboard.html", line 1, in top-level template code {% extends "base.html" %} File 
"/usr/local/lib/python2.7/dist-packages/amon-0.6_dev-py2.7.egg/amon/web/templates/base.html", line 28, in top-level template code {% block content %} File "/usr/local/lib/python2.7/dist-packages/amon-0.6_dev-py2.7.egg/amon/web/templates/dashboard.html", line 17, in block "content" {% set cpu = last_check.cpu.system + last_check.cpu.user %} UndefinedError: 'dict object' has no attribute 'system' 

Thanks!

from amon.

martinrusev avatar martinrusev commented on August 17, 2024

Can you please delete the old data.
mongo in the terminal

 use amon
 db.amon_disk.remove()

And if you haven't:

 sudo /etc/init.d/amon restart
 sudo /etc/init.d/amond restart 

from amon.

tsileo avatar tsileo commented on August 17, 2024

I have reinstalled, dropped the database ( "use amon" and "db.dropDatabase()" ) and I restarted both amon and amond,
and I got this on the dashboard (the CPU, and .Private partition charts doesn't work) :

Error 500

Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/tornado-2.1.1-py2.7.egg/tornado/web.py", line 954, in _execute getattr(self, self.request.method.lower())(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/amon-0.6_dev-py2.7.egg/amon/web/views.py", line 72, in get unread_values=self.unread_values File "/usr/local/lib/python2.7/dist-packages/amon-0.6_dev-py2.7.egg/amon/web/template.py", line 246, in render return template.render(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/jinja2/environment.py", line 894, in render return self.environment.handle_exception(exc_info, True) File "/usr/local/lib/python2.7/dist-packages/amon-0.6_dev-py2.7.egg/amon/web/templates/dashboard.html", line 1, in top-level template code {% extends "base.html" %} File "/usr/local/lib/python2.7/dist-packages/amon-0.6_dev-py2.7.egg/amon/web/templates/base.html", line 28, in top-level template code {% block content %} File "/usr/local/lib/python2.7/dist-packages/amon-0.6_dev-py2.7.egg/amon/web/templates/dashboard.html", line 17, in block "content" {% set cpu = last_check.cpu.system + last_check.cpu.user %} UndefinedError: 'dict object' has no attribute 'system'

from amon.

martinrusev avatar martinrusev commented on August 17, 2024

Can you please check the cpu collection

mongo 
use amon
db.amon_cpu.find()

from amon.

tsileo avatar tsileo commented on August 17, 2024

Here is the dump:

> db.amon_cpu.find()
{ "_id" : ObjectId("4edfcbab152b0c3801000014"), "time" : 1323289515 }
{ "_id" : ObjectId("4edfcbe7152b0c380100001a"), "time" : 1323289575 }
{ "_id" : ObjectId("4edfcc23152b0c3801000020"), "time" : 1323289635 }
{ "_id" : ObjectId("4edfcc60152b0c3801000026"), "time" : 1323289695 }
{ "_id" : ObjectId("4edfcc9c152b0c380100002c"), "time" : 1323289756 }
{ "_id" : ObjectId("4edfccd8152b0c3801000032"), "time" : 1323289816 }
{ "_id" : ObjectId("4edfcd14152b0c3801000038"), "time" : 1323289876 }

from amon.

martinrusev avatar martinrusev commented on August 17, 2024

The tests are passing. So weird.
Working on that, I will release an update as soon as possible :)

from amon.

tsileo avatar tsileo commented on August 17, 2024

Ok thanks ! I am impatient to see the dashboard.

from amon.

martinrusev avatar martinrusev commented on August 17, 2024

Can you please the result after running this command:

  iostat -c

from amon.

tsileo avatar tsileo commented on August 17, 2024
Linux 2.6.38-13-server (homeserver)     07/12/2011  _x86_64_    (4 CPU)

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           0,78    1,26    0,39    0,25    0,00   97,32

from amon.

martinrusev avatar martinrusev commented on August 17, 2024

Sorry again, but its working everywhere I check. One last command:
python in the terminal:

 from amon.system.collector import system_info_collector
 system_info_collector.get_cpu_utilization()

from amon.

tsileo avatar tsileo commented on August 17, 2024
>>> from amon.system.collector import system_info_collector
>>> system_info_collector.get_cpu_utilization()
{}

from amon.

martinrusev avatar martinrusev commented on August 17, 2024

I saw the problem :)
Localization.
By default iostat displays things with . and on your system its ,
I am working on a fix. Thank you for the patience

from amon.

tsileo avatar tsileo commented on August 17, 2024

Ok thanks you so much !

from amon.

martinrusev avatar martinrusev commented on August 17, 2024

You can update now. That issue is fixed in 0.5.6

from amon.

tsileo avatar tsileo commented on August 17, 2024

There is still a bug, I got this error when I tried system_info_collector.get_cpu_utilization():

>>> system_info_collector.get_cpu_utilization()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/amon-0.6_dev-py2.7.egg/amon/system/collector.py", line 198, in get_cpu_utilization
    cpu_values = map(lambda x: int(float(x)), values) # Convert the values to float and then to int
  File "/usr/local/lib/python2.7/dist-packages/amon-0.6_dev-py2.7.egg/amon/system/collector.py", line 198, in <lambda>
    cpu_values = map(lambda x: int(float(x)), values) # Convert the values to float and then to int
ValueError: invalid literal for float(): 0,79

I sent you a pull request (https://github.com/tsileo/amon/commit/11e778c03daa09dc23f31e165ceb5c30b07f629b), the line 198 of amon/system/collector.py should be:

cpu_values = map(lambda x: int(float(x.replace(',', '.'))), values)

And just a detail, there is a little bug in the css of the dashboard (http://www.uploadscreenshot.com/image/613846/2658454) and there is no chart for "/home/thomas/.Private". And the update button in the system page contain "http://127.0.0.1:2464/system?date_from=.." in hard so its broken when I try to acced over the network via the apache proxy mod, it should be "/system?date_from=..."

from amon.

martinrusev avatar martinrusev commented on August 17, 2024

The float bug should be fixed.
For the private thing charts -> its more complicated than I though, so I will leave it for tomorrow :)
The url you see in the system page is from the /etc/amon.conf, so just leave host empty and everything should work just fine.
Or add a static ip: 83.23.something ... if you can

from amon.

rogeriopvl avatar rogeriopvl commented on August 17, 2024

Hi!

I wonder if it's possible to make this work when iostat is not available.

$ iostat -c
Cannot find disk data

I'm using amon on a VPS.

from amon.

loicm avatar loicm commented on August 17, 2024

Same error here on a VPS while using iostat. Is there a fallback available?

from amon.

martinrusev avatar martinrusev commented on August 17, 2024

Can you please paste me the error and tell me your OS details

from amon.

loicm avatar loicm commented on August 17, 2024

$ iostat -c
Cannot find disk data

It's an ubuntu 11.10 (VPS). What details do you want?

from amon.

loicm avatar loicm commented on August 17, 2024

And the exact error while accessing the dashboard is :

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/tornado-2.2-py2.7.egg/tornado/web.py", line 988, in _execute
    getattr(self, self.request.method.lower())(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/tornado-2.2-py2.7.egg/tornado/web.py", line 1739, in wrapper
    return method(self, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/amon-0.7.5-py2.7.egg/amon/web/views/app.py", line 52, in get
    process_check_first=process_check_first,
  File "/usr/local/lib/python2.7/dist-packages/amon-0.7.5-py2.7.egg/amon/web/views/base.py", line 114, in render
    rendered_template = jinja_render(template, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/amon-0.7.5-py2.7.egg/amon/web/template.py", line 333, in render
    return template.render(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/Jinja2-2.6-py2.7.egg/jinja2/environment.py", line 894, in render
    return self.environment.handle_exception(exc_info, True)
  File "/usr/local/lib/python2.7/dist-packages/amon-0.7.5-py2.7.egg/amon/web/templates/dashboard.html", line 1, in top-level template code
    {% extends "base.html" %}
  File "/usr/local/lib/python2.7/dist-packages/amon-0.7.5-py2.7.egg/amon/web/templates/base.html", line 32, in top-level template code
    {% block content %}
  File "/usr/local/lib/python2.7/dist-packages/amon-0.7.5-py2.7.egg/amon/web/templates/dashboard.html", line 23, in block "content"
    {% set cpu = last_check.cpu.system + last_check.cpu.user %}
UndefinedError: 'dict object' has no attribute 'system'

from amon.

martinrusev avatar martinrusev commented on August 17, 2024

Can you please try sar 1 1 and if it works, I am going to merge this pull request https://github.com/martinrusev/amon/pull/87 as a fallback

from amon.

loicm avatar loicm commented on August 17, 2024
$ sar 1 1
Linux 2.6.32-042stab049.6 (vks10334)    03/22/2012  _x86_64_    (1 CPU)

11:09:48 AM     CPU     %user     %nice   %system   %iowait    %steal     %idle
11:09:49 AM     all      0.00      0.00      0.00      0.00      0.00      0.00
Average:        all      0.00      0.00      0.00      0.00      0.00      0.00

from amon.

martinrusev avatar martinrusev commented on August 17, 2024

Nice. Thank you.

from amon.

rogeriopvl avatar rogeriopvl commented on August 17, 2024

Great this works :)

from amon.

Related Issues (20)

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.