Blogs

Silencing the Nagios Plugin check_ntp_peer

in

The Nagios plugin "check_ntp_peer" from Debian package "nagios-plugins-basic" is not very nice. It shouts at you about LI_ALARM bit and negative jitter all the time after a machine reboots despite everything actually being fine.

#!/bin/bash

result=$(/usr/lib/nagios/plugins/check_ntp_peer $@)
status=$?

if echo "$result" | egrep 'jitter=-1.00000|has the LI_ALARM' >/dev/null; then
	echo "Unknown state after reboot."
	exit 0
fi

echo $result
exit $status

Using above wrapper you get rid of the warnings.

Liferea 1.10 not Starting in Fedora 18/19

Several users reporting startup problems of a self-compiled 1.10 in Fedora (SF bug #1093):

(liferea:3798): GLib-GIO-ERROR **: Settings schema 'net.sf.liferea' does not contain a key named 'last-node-selected'
Trace/breakpoint trap

As you can see from the error message Liferea doesn't start because a dconf schema key is not known. A solution was suggested by nmdias: if you experience this problem please try to run

/usr/bin/glib-compile-schemas /usr/share/glib-2.0/schemas

to properly install the schema.

Liferea Trick #5: Privacy with a SOCKS Proxy

Give a +1 if you found this post useful!

Starting with Liferea 1.10 you can use a SOCKS proxy. This is possible because Liferea uses the libproxy support provided by the libsoup networking library since 1.10.

What is a SOCKS Proxy?

SOCKS stands for "socket secure" it simply means to use an encrypted connection for whatever you do. Configuring a SOCKS proxy in your desktop environment means that you want all applications to do internet access via an encrypted connection to a safe server you have access to.

Why Use a SOCKS Proxy for Feed Reading?

Well, this of course is useful if you are in an environment were you do not want others to see what you are reading. Be it political blogs or private but unencrypted feeds. Also you simply might not want for your employer to know what servers you are polling news feeds from anyway. There are many good and bad reasons.

How To Use SOCKS Proxy with Liferea and GNOME?

First please note that Liferea supports using a SOCKS proxy only via the GNOME network preferences. Actually it relies on libsoup using the SOCKS settings from there.

Requirements

  1. Liferea 1.10+ with GNOME desktop
  2. You have a private server to use as a proxy
  3. You can connect via SSH to this server

Step 1: Connecting the SOCKS Proxy

There are many ways to do this and many online tutorials. The easiest way is to use SSH like this

ssh -D 8080 <user>@<private server>

Step 2: Client Proxy Configuration

So the first thing to do is to configure Liferea to use the GNOME network settings:

Ensure to set the preferences to proxy auto-detect as shown in the screenshot above. Next go to the GNOME preferences and configure a SOCKS proxy on "localhost" and port "8080" or whatever port you used when you ran the SSH command.

That's it! Try to update feeds in Liferea and watch out for errors in the status line.

What About Older Liferea Versions?

If you are running an older version of Liferea have a look at this post about a SOCKS proxy workaround using the tool redsocks.

How to Get TinyTinyRSS Categories

in

If you are using TinyTinyRSS and want a hierarchic subscription list you need to explicitely enable categories from the preferences! Ensure to enable the "Enables feed categories" check box. Then save and open the "Feeds" tab which now allows you to add categories. All existing feeds are presented in category "Uncategorized".

Preferences Screenshot

Liferea Trick #4: Full Screen Mode

Give a +1 if you found this post useful!

Are you using a netbook and have not much screen real estate? Then wether it is a mail client or web browser or news aggregator using it in full screen mode gets you more content visible. Less space is wasted for menu elements and window decoration.

In Liferea press F11 or select "View" -> "Fullscreen" to enable full screen mode.

If you want to save even more vertical space consider hiding the toolbar by enabling the option in the preferences dialog.

Missing Roles in "knife node show" Output

Sometimes the knife output can be really confusing:

$ knife node show myserver
Node Name:   myserver1
Environment: _default
FQDN:        myserver1
IP:          
Run List:    role[base], role[mysql], role[apache]
Roles:       base, nrpe, mysql
Recipes:     [...]
Platform:    ubuntu 12.04
Tags:        

Noticed the difference in "Run List" and "Roles"? The run list says "role[apache]", but the list of "Roles" has no Apache. This is because of the role not yet being run on the server. So a

ssh root@myserver chef-client

Solves the issue and Apache appears in the roles list.

The learning: do not use "knife node show" to get the list of configured roles!

Liferea Trick #3: Use Feed Auto Discovery

in
Give a +1 if you found this post useful!

This is an easy one: Don't bother entering the exact feed URL when subscribing!

These days it is standard for websites to support feed auto discovery. Many blogs and websites actually do not add feed subscription icons and links anymore. The feed link is just included in the HTML markup and every aggregator can extract it. No need for you to look for it.

To make it even simpler combine with trick #2 and use drag&drop! On every websites whose feed you want to add just drag the favicon from the browser location bar into Liferea. Most browsers do interpret this as dragging the location. Do not even bother copying the URL.

Be lazy :-)

Liferea Trick #2: Drag and Drop URLs

Give a +1 if you found this post useful!

Maybe it is obvious, but you can of course use Drag&Drop to add feed subscriptions to Liferea.

You can drag

  • into the subscription list
  • onto the tray icon

and Liferea will create a new subscription.

You can also Drag&Drop any web sites URL and Liferea will try to auto-discover the feed URL from it.

Note that dragging URLs into the item browser pane or a browser tab will just launch the URL in the internal browser.

Liferea Trick #1: Middle Mouse Button Clicking

Give a +1 if you found this post useful!

For all the readers of this development blog I want to share same hidden usability things in Liferea. Today I want to start with using the 3rd mouse button.

Place Where To Use Middle Click

  1. Subscription List: Click on any subscription or folder to mark everything in the subscription or folder as read.
  2. Item List (on flag column): Click on the flag column to toggle the flag for an item without selecting it.
  3. Item Lists (except flag column): Click everwhere beside the flag column and you toggle the read status of the item even without selecting it.
  4. Browser View: In any browser view, be it a browser tab or the item view pane middle click any link to open it in a new browser tab within Liferea.

How To Debug PgBouncer

When you use Postgres with pgbouncer when you have database problems you want to have a look at pgbouncer too. To inspect pgbouncer operation ensure to add at least one user you defined in the user credentials file (e.g. on Debian per-default /etc/pgbouncer/userlist.txt) to the "stats_users" key in pgbouncer.ini:

stats_users = myuser

Now reload pgbouner and use this user "myuser" to connect to pgbouncer with psql by requesting the special "pgbouncer" database:

psql -p 6432 -U myuser -W pgbouncer

At the psql prompt list the supported pgbouncer commands with

SHOW HELP;

PgBouncer will present all statistics and configuration options:

pgbouncer=# SHOW HELP;
NOTICE:  Console usage
DETAIL:  
	SHOW HELP|CONFIG|DATABASES|POOLS|CLIENTS|SERVERS|VERSION
	SHOW STATS|FDS|SOCKETS|ACTIVE_SOCKETS|LISTS|MEM
	SET key = arg
	RELOAD
	PAUSE []
	SUSPEND
	RESUME []
	SHUTDOWN

The "SHOW" commands are all self-explanatory. Very useful are the "SUSPEND" and "RESUME" commands when you use pools.

Syndicate content