Notices


Reply
Thread Tools
Posts: 68 | Thanked: 36 times | Joined on Dec 2009
#31
Originally Posted by lothix View Post
Ah, you have Nagios set up to use digest authentication. That's why you can't connect with Maegios right now. It doesn't support digest authentication yet. I will include support for digest authentication in the next release. Thanks!
Switched to basic auth, and it works :-)

You've just made my day! The icons are very nice too...
 
Posts: 68 | Thanked: 36 times | Joined on Dec 2009
#32
Ok, so now that I have manged to get it to work, some early testing results. Overall, the app feels quite polished. Here is my random mix of comments, bug reports, feature requests, in no particular order.

feature request: it would be nice to be able to have a visual clue in the app as to when the information was last refreshed. For instance by having a "last updated X minutes ago" or "last updated 12:35", or some such thing, at the top/bottom of the main application window.

GUI issue: I can see the status message of the services to the right. There are two issues with this: the first is a minor usability issue, that the i have to scroll to the right to see this, even though there seems to be enough space on the screen to show both the service name and the status in most cases. At first I had not even noticed the status messages are there. The second is that the status is sometimes truncated, for instance saying "DISK WARNING", but not the % of the disk that is used. Not sure what algorithm you use for the truncation, as some of the status messages from my custom nagios plugins are not truncated.

I am thinking that it would be useful to be able to see the whole status message, as 9% disk space is very different from 1%... but of course that won't work with the width of the screen. Maybe the entire status message could open when tapping an individual service, as a "child node" of the service?
Or alternatively a "details" window could somehow be opened (tap and hold on the service?), which might be able to also hold additional info such as the up/downtime, last check, etc .

Finally, I had some strange behavior when I first installed the widget... the whole hildon desktop seemed to be almost frozen, especially launcher icons which did not respond. I had to restart hildon-home several times (got the "is not responding" dialog), and rebooting did not fix the problem, so I removed the widget. However, I have now re-added the widget to my desktop and did not re-encounter the problem, so I don't know what's up.... If it does not happen again I will blame alien mind control and happily ignore the issue.
 
Posts: 16 | Thanked: 169 times | Joined on Dec 2009 @ Chicago, IL
#33
Maegios supports scrolling. So those issues that you describe with the text being truncated are not present on my installation.
 
Posts: 68 | Thanked: 36 times | Joined on Dec 2009
#34
Originally Posted by vasillalov View Post
Maegios supports scrolling. So those issues that you describe with the text being truncated are not present on my installation.
Thanks for the reply. Maegios supports scrolling on my n900 too, but the text seems to be truncated.

Here is the text of of two services as I see them in the nagios web interface:

Code:
DISK WARNING - free space: /root 202144 MB (10% inode=-)
APT OK: 0 packages available for upgrade (0 critical updates).
In maegios, I just see

Code:
DISK WARNING
APT OK
The message seems to be truncated at the first ":" or "-" character.
 
Ralph's Avatar
Posts: 14 | Thanked: 10 times | Joined on Jan 2010 @ Italy
#35
I don't know which version other people are testing, but i have an issue in version 0.3.1-2 during the connection similar to the one described before in this thread.
Using python, as described, I found out that in file nagiosconnector.py, line 57 the variable url[3] is the problem.
My Nagios instance isn't in a subdirectory, my URL is like http://nagios.domain.it
So i do not have any element at index 3 in the array url and I have an error trying to access an element beyond the end of the array.
After a little i realized that a trailing slash in the URL is needed for correct parsing.
I'm new to python but have some experience with other languages.
Maybe you have to check the size of the array or find a better way to parse the url, maybe using regexp.

Thanks for the good job

Last edited by Ralph; 2010-02-02 at 11:10. Reason: Spelling
 
Posts: 3,841 | Thanked: 1,079 times | Joined on Nov 2006
#36
The correct URL is always with a trailing slash, unless the URL is to a specific file.
I.e. http://nagios.domain.it/ is correct, http://nagios.domain.it is not. The latter will generate a redirection event, i.e. two lookups where only one is needed in the first version. This applies to URLs in general, e.g. when using browsers or anything.
__________________
N800/OS2007|N900/Maemo5
-- Metalayer-crawler delenda est.
-- Current state: Fed up with everything MeeGo.
 
Ralph's Avatar
Posts: 14 | Thanked: 10 times | Joined on Jan 2010 @ Italy
#37
Here's my little contribution in using regular expressions to correctly parse the URL:

Code:
Type "help", "copyright", "credits" or "license" for more information.
>>> import re
>>> p = re.compile('(http|https)?:?\/?\/?([a-z]*\.?[a-z]*\.[a-z]*)\/?(.*)')
>>> m = re.search(p,'http://www.nagios.org')
>>> m.group(1)
'http'
>>> m.group(2)
'www.nagios.org'
>>> m.group(3)
''
>>> m = re.search(p,'https://www.nagios.org/foo')
>>> m.group(1)
'https'
>>> m.group(2)
'www.nagios.org'
>>> m.group(3)
'foo'
>>> m = re.search(p,'nagios.org/foo')
>>> m.group(1)
>>> m.group(2)
'nagios.org'
>>> m.group(3)
'foo'
>>>
There are still some potential issues if URL is written in uppercase or if a trailing slash is inserted after a subfolder, http://WWW.NAGIOS.ORG/nagios/ is still not parsed correctly by the above regexp but with a couple of str.lower() and str.strip() you can have a lowercase string without a trailing /.

Hope this can help
 

The Following User Says Thank You to Ralph For This Useful Post:
Ralph's Avatar
Posts: 14 | Thanked: 10 times | Joined on Jan 2010 @ Italy
#38
Originally Posted by TA-t3 View Post
The correct URL is always with a trailing slash, unless the URL is to a specific file.
I.e. http://nagios.domain.it/ is correct, http://nagios.domain.it is not. The latter will generate a redirection event, i.e. two lookups where only one is needed in the first version. This applies to URLs in general, e.g. when using browsers or anything.
You are right, but if you parse an url by splitting a string by slashes (as done in the maegios code) you can't trust users input.
As said before in this thread someone had a trailing space after username so the data submitted by the user must be somehow checked for correctness.
 
Posts: 1 | Thanked: 0 times | Joined on Feb 2010
#39
Hi,

I have been testing maegios and it looks nice, but I ran into one problem. When for some reason your phone is not able to reach the nagios server, for example because their is no network connection possible, maegios seems to block / lockup a lot of things in your phone.

For example, I have an alert set every morning to wake up, this didn't work anymore. SMS messages didn't arrive properly etc. Only when I killed the maegios application my phone started alerting me a lot of time that I had to wake up. Only after restarting the phone and uninstalling the app everything was back to normal again.

I have now changed the app to connect to my nagios server through an external secure site and that works fine so far.

Will keep testing the coming day's.

Greetings,
Jan Hugo Prins
 
Posts: 25 | Thanked: 27 times | Joined on Oct 2009 @ Amsterdam
#40
Originally Posted by feydrutha View Post
Thanks for the reply. Maegios supports scrolling on my n900 too, but the text seems to be truncated.

Here is the text of of two services as I see them in the nagios web interface:

Code:
DISK WARNING - free space: /root 202144 MB (10% inode=-)
APT OK: 0 packages available for upgrade (0 critical updates).
In maegios, I just see

Code:
DISK WARNING
APT OK
The message seems to be truncated at the first ":" or "-" character.
I've created a patch in couple of mins for this. The patch could be cleaner but it works now. However since messages are larger they make the screen also scroll in the horizontal direction.

Patch is at http://hg.trbs.net/maegios/

Vasillalov, can we talk about something like this in the maegios main line ?
 
Reply


 
Forum Jump


All times are GMT. The time now is 14:55.