
Nagios Plasmoid
Source (link to git-repo or to original if based on someone elses unmodified work):
Extra Dependency:
- python-lxml (http://codespeak.net/lxml/)
Project-Page: http://code.google.com/p/nagios-plasmoid/
Please report bugs on this bug-tracker: http://code.google.com/p/nagios-plasmoid/issues/list
* 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
Ratings & Comments
11 Comments
I am having issues adding the plasmoid to kde4.7 plasma-desktop locks up. Any ideas?
Try to install python-lxml package...
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
Unfortunately it throws exceptions, first one was on start and the other one - when I tried to open settings. http://gdr.pastebin.pl/32052
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
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
This works for me. Thanks.
The download link offers to download 114057-nagios-plasmoid-0.6.plasmoid Shouldn't it be -0.7 ?
I cant install it: plasmapkg -i ~/download/114057-nagios-plasmoid.plasmoid Installation fehlgeschlagen: /home/bodsch/download/114057-nagios-plasmoid.plasmoid
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
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