Version 12 (modified by bartek, 11 years ago) (diff)

--

QCG-Notification maintenance

Sometimes, in case of wrong configuration or rather wrongly tuned configuration for a certain scenario, it may be required to clean the notification data stored in the service. There are a number of possible ways of cleaning, but we will discuss only a few of them.

Flashing the database

If notification data is not critical, the most strightforward option may be to completly flash the database. In such a case, you should follow the following steps:

  1. Turn off the service
    /sbin/service qcg-ntfd stop
    
  1. Invoke the following command:
    psql -h localhost -d qcg-ntf -a -f /usr/share/qcg-ntf/tools/qcg-ntf-psql.sql
    

If you encounter the problem 'psql:/usr/share/qcg-ntf/tools/qcg-ntf-psql.sql:27: ERROR: syntax error at or near "EXISTS" at character 15', you should edit the script and remove all occurrences 'IF EXISTS' (this construction is not supported in older versions of PostreSQL).

  1. Start the service again
    /sbin/service qcg-ntfd start
    

Removeing selected objects

In some scenarios it may be abandoned to flash entire notification data. In such cases, you can selectively remove particullar objects. You may follow two directions: removeing objects 'online' using the QCG-Notification command line client or removeing object 'offline' in a database. Below we present these two options with the example of removeing unwanted pullpoints.

Removeing objects 'online'

The following command will remove all pullpoints when the service is running:

for i in `qcg-ntf-client -u http://grass1.man.poznan.pl:19001 -2 "" | awk -F "'" '/address/ {print $2}'`; do qcg-ntf-client -u $i -T "" ; done

Removeing objects 'offline'