Nagios Plasmoid

Plasma 4 Extensions

Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net

3
Score 74.3%
Last changelog:

9 years ago

* Version 0.8 25.02.2011
- new icons (thanks to Holger Hees)
- patches for wallet
- applied patches
- more fault-tolerant string parsing(encoding)

* Version 0.7 27.10.2009
- fix url of "Open Nagios" button
- fix position of popup-dialog
- services-list: onclick go to "Nagios Extended Information"

* Version 0.6 26.10.2009
New config options:
- show/hide label
- background-color
- type of notification (persistent, timeout ...)
- debug to file (~/nagios-plasmoid.log)
- show/hide searchfield
New Actions
- go to nagios, services, hosts
- check now
Dialog
- new layout
- change size

* Version 0.5 20.10.2009
- first release

spartak

8 years ago

I am having issues adding the plasmoid to kde4.7 plasma-desktop locks up. Any ideas?

Report

blackhat77

8 years ago

Try to install python-lxml package...

Report

mjakubicek

9 years ago

Hi,

the widget is great, I'm just experiencing one issue with the buttons in the Actions pane: they are too wide so that one cannot see the labels, see the screenshot:

http://tinypic.com/view.php?pic=2uoi03q&s=7

Report

GDR

9 years ago

Unfortunately it throws exceptions, first one was on start and the other one - when I tried to open settings.

http://gdr.pastebin.pl/32052

Report

jsaathof

10 years ago

I created a patch for storing multiple (different) passwords in kwallet (fixed password reading since a change in kwallet API in KDE4.4). Hope you find it useful...

I also added the KDE4.4 patches supplied earlier by logrus.

Sorry for the formatting of the patch. Lines starting with an exclamation mark are the altered or added lines. Send me a message and I will send the patch in proper format.


diff -crB ../orig/contents/code/main.py ../nagios.plasmoid/contents/code/main.py
*** ../orig/contents/code/main.py 2009-10-26 02:22:01.000000000 +0100
--- ../nagios.plasmoid/contents/code/main.py 2010-05-20 15:24:15.821869531 +0200
***************
*** 189,195 ****

self.nagios_server.nagios_url = str(gc.readEntry("nagios_url", QVariant("http://www.example.com/nagios/")).toString())

self.nagios_server.nagios_cgi_url = str(gc.readEntry("nagios_cgi_url",QVariant("http://www.example.com/cgi-bin/nagios3/")).toString())
self.nagios_server.username = str(gc.readEntry("username", QVariant("username")).toString())
! self.nagios_server.password = None
self.nagios_server.use_proxy_yes = bool(gc.readEntry("use_proxy_yes", QVariant(True)).toBool())
self.nagios_server.use_proxy_no = bool(gc.readEntry("use_proxy_no", QVariant(False)).toBool())
self.nagios_server.debug = bool(gc.readEntry("debug", QVariant(False)).toBool())
--- 189,195 ----
self.nagios_server.nagios_url = str(gc.readEntry("nagios_url", QVariant("http://www.example.com/nagios/")).toString())
self.nagios_server.nagios_cgi_url = str(gc.readEntry("nagios_cgi_url",QVariant("http://www.example.com/cgi-bin/nagios3/")).toString())
self.nagios_server.username = str(gc.readEntry("username", QVariant("username")).toString())
! self.nagios_server.password = "None"
self.nagios_server.use_proxy_yes = bool(gc.readEntry("use_proxy_yes", QVariant(True)).toBool())
self.nagios_server.use_proxy_no = bool(gc.readEntry("use_proxy_no", QVariant(False)).toBool())
self.nagios_server.debug = bool(gc.readEntry("debug", QVariant(False)).toBool())
***************
*** 207,213 ****
# Get passwords from wallet
self.wallet.setFolder("nagios-plasmoid")
passwd = QString()
! self.wallet.readPassword(self.nagios_server.username, passwd)
self.nagios_server.password = unicode(passwd)

# Now start checking for emails
--- 207,217 ----
# Get passwords from wallet
self.wallet.setFolder("nagios-plasmoid")
passwd = QString()
! try:
! # KDE 4.4
! passwd = self.wallet.readPassword(self.nagios_server.username + "@" + self.nagios_server.name)[1]
! except:
! self.wallet.readPassword(self.nagios_server.username + "@" + self.nagios_server.name, passwd)
self.nagios_server.password = unicode(passwd)

# Now start checking for emails
***************
*** 231,237 ****

def checkNow(self):
if self.nagios_server.isChecking :
! self.debug("checkNow: nagios-servier is already checking")
return False
self.debug("checkNow: scheduling check")
self.stopTimer()
--- 235,241 ----

def checkNow(self):
if self.nagios_server.isChecking :
! self.debug("checkNow: nagios-server is already checking")
return False
self.debug("checkNow: scheduling check")
self.stopTimer()
***************
*** 304,310 ****
if not wallet.hasFolder("nagios-plasmoid"):
wallet.createFolder("nagios-plasmoid")
wallet.setFolder("nagios-plasmoid")
! wallet.writePassword(self.configParameters.getUsername(), self.configParameters.getPassword())
else:
# KWallet disabled, we don't do anything...
pass
--- 308,314 ----
if not wallet.hasFolder("nagios-plasmoid"):
wallet.createFolder("nagios-plasmoid")
wallet.setFolder("nagios-plasmoid")
! wallet.writePassword(self.configParameters.getUsername() + "@" + self.configParameters.getServerName(), self.configParameters.getPassword())
else:
# KWallet disabled, we don't do anything...
pass
diff -crB ../orig/contents/code/NagiosUI.py ../nagios.plasmoid/contents/code/NagiosUI.py
*** ../orig/contents/code/NagiosUI.py 2009-10-26 02:07:53.000000000 +0100
--- ../nagios.plasmoid/contents/code/NagiosUI.py 2010-05-20 10:57:39.097863605 +0200
***************
*** 144,150 ****


def openNagios(self):
! self.openUrl(self.plasmoid.nagios_server.nagios_cgi_url)

def openNagiosHosts(self):
self.openUrl(self.plasmoid.nagios_server.nagios_cgi_url + "/status.cgi?hostgroup=all&style=hostdetail&hoststatustypes=12")
--- 144,150 ----


def openNagios(self):
! self.openUrl(self.plasmoid.nagios_server.nagios_cgi_url + "/status.cgi?host=all&servicestatustypes=28")

def openNagiosHosts(self):
self.openUrl(self.plasmoid.nagios_server.nagios_cgi_url + "/status.cgi?hostgroup=all&style=hostdetail&hoststatustypes=12")
diff -crB ../orig/metadata.desktop ../nagios.plasmoid/metadata.desktop
*** ../orig/metadata.desktop 2009-10-24 20:50:18.000000000 +0200
--- ../nagios.plasmoid/metadata.desktop 2010-05-20 16:08:21.581888262 +0200
***************
*** 7,12 ****
--- 7,13 ----
Icon=nagios-plasmoid-128.png
X-Plasma-API=python
X-Plasma-MainScript=code/main.py
+ X-Plasma-NotificationArea=true
X-KDE-PluginInfo-Author=Nik Lutz
X-KDE-PluginInfo-Email=nik.lutz@gmail.com
X-KDE-PluginInfo-Name=nagios-plasmoid
***************
*** 15,18 ****
X-KDE-PluginInfo-Category=Online Services
X-KDE-PluginInfo-Depends=
X-KDE-PluginInfo-License=GPL
! X-KDE-PluginInfo-EnabledByDefault=true
\ No newline at end of file
--- 16,19 ----
X-KDE-PluginInfo-Category=Online Services
X-KDE-PluginInfo-Depends=
X-KDE-PluginInfo-License=GPL
! X-KDE-PluginInfo-EnabledByDefault=true

Report

logrus

10 years ago

Hi,
If you can't show setting's dialog then follow theses steps :

1/ download the current plasmoid and rename .plasmoid to .zip
2/ unzip it
3/ open contents/code/main.py
4/ modify the line 192 :
self.nagios_server.password = None
by
self.nagios_server.password = "None"
------- Start Optionnal modification --------
5/ open metadata.desktop and add this line X-Plasma-NotificationArea=true
------- End Optionnal modification --------
6/ zip the content and rename .zip to .plasmoid
7/ remove nagios-plasmoid : plasmapkg -r nagios-plasmoid
8/ install new nagios-plasmoid : plasmapkg -i FILENAME.plasmoid

PS : with the optionnal modification ( step 5 ) you can show nagios plasmoid inside your systray

That's all, hope it works for you

Report

Ases

10 years ago

This works for me. Thanks.

Report

mfoakes

10 years ago

The download link offers to download 114057-nagios-plasmoid-0.6.plasmoid

Shouldn't it be -0.7 ?

Report

SirDodger

10 years ago

I cant install it:
plasmapkg -i ~/download/114057-nagios-plasmoid.plasmoid
Installation fehlgeschlagen: /home/bodsch/download/114057-nagios-plasmoid.plasmoid

Report

C

nik3nt3

10 years ago

hmmm a lot of info .-)

what says:
unzip -t 114057-nagios-plasmoid.plasmoid


I only got this error when I try to reinstall it, e.g.:

>plasmapkg -i ~/Desktop/114057-nagios-plasmoid.plasmoid
Installation fehlgeschlagen: /home/nik/Desktop/114057-nagios-plasmoid.plasmoid

Because:
>plasmoidviewer --list | grep -i nagios
nagios-plasmoid - Nagios status monitor


So:
>plasmapkg -r nagios-plasmoid
Erfolgreich entfernt: nagios-plasmoid

>plasmapkg -i 114057-nagios-plasmoid.plasmoid
Erfolgreich installiert: /home/nik/Desktop/114057-nagios-plasmoid.plasmoid


Which version of KDE are you running? - I use 4.3 (kubuntu), never tested it on 4.2.X

Report

SirDodger

10 years ago

Sorry, for the 'small' Info! ;)

Okay, with your way, the plasmoid are installed.
I'm on testing ;)

BTW. I use curren KDE4.3.4 on gentoo

Report

9 years ago

* Version 0.8 25.02.2011
- new icons (thanks to Holger Hees)
- patches for wallet
- applied patches
- more fault-tolerant string parsing(encoding)

* Version 0.7 27.10.2009
- fix url of "Open Nagios" button
- fix position of popup-dialog
- services-list: onclick go to "Nagios Extended Information"

* Version 0.6 26.10.2009
New config options:
- show/hide label
- background-color
- type of notification (persistent, timeout ...)
- debug to file (~/nagios-plasmoid.log)
- show/hide searchfield
New Actions
- go to nagios, services, hosts
- check now
Dialog
- new layout
- change size

* Version 0.5 20.10.2009
- first release

12345678910
19
product-maker sgruendel Nov 03 2011 9 excellent
product-maker WarpCoil May 11 2011 9 excellent
product-maker hotchillipott Apr 29 2011 9 excellent
product-maker Infosoft Apr 04 2011 9 excellent
product-maker zakaqere Mar 19 2011 9 excellent
product-maker leifmg Mar 12 2011 9 excellent
product-maker kem Feb 26 2011 9 excellent
product-maker deabru Feb 26 2011 9 excellent
product-maker Fido77 Jan 11 2011 3 bad
product-maker hhees Nov 21 2010 9 excellent
product-maker Base: 4 x 5.0 Ratings
TaoFr
May 11 2012
blackhat77
Sep 04 2011
hhees
Nov 21 2010
File (click to download) Version Description Downloads Date Filesize DL OCS-Install MD5SUM
*Needs pling-store or ocs-url to install things
Pling
0 Affiliates
Details
license
version
0.8
updated Feb 25 2011
added Oct 19 2009
downloads 24h
0
mediaviews 24h 0
pageviews 24h 1