syspoll

Package: WA2L/edrc 1.5.57
Section: General Commands (1)
Updated: 18 July 2015
Index Return to Main Contents

 

NAME

syspoll - poll systems to execute a query

 

SYNOPSIS

edrc/bin/syspoll [ -h ]

syspoll [ -c configfile ] [ -r retries[:interval] ] -a { start | retry } -j jobname [ -s setname ] [ -t hostlist ] [ -o outputfile ]

syspoll [ -c configfile ] -a { list_retry } -j jobname [ -s setname ]

syspoll [ -c configfile ] -a { list_jobs | list_sets | list_prots | list_perf }

syspoll [ -c configfile ] -a { print_log [ -b begin_date ][ -e end_date ] }

 

AVAILABILITY

WA2L/edrc

 

DESCRIPTION

poll systems and execute a query.

The main purpose is to centrally control report data collection for different target operating systems.

syspoll writes all command status and information output to stderr and only the job header and the query results to stdout respectively the outputfile if specified.

The following phases are traversed when a syspoll job is executed ( start or retry ) in a certain set:

1)
general information

print general information about the environment where syspoll is started, the configuration and the impact of some configuration- and command line options.

2)
set information

print information about the set.

3)
job information

print information about the job.

4)
job header

write the job header as specified in the JOB_HEADER setting in VARDIR/jobs/<jobname>/job.cfg to the outputfile (if specified) and stdout if the action -a start is selected.

If if the action -a retry is selected, the job header is not written (again) to the outputfile and is printed for reference purposes to stderr only.

5)
connect to systems

connect to all systems as specified in the system target list using -t hostlist, the retry file or the POLL_HOSTLIST setting in the etc/syspoll.cfg file depending on the command line options selected.

5.1)
resolve connection information

try to resolve connection information, as the IP address, of the system to connect to. If the IP address cannot be resolved, no connection is possible (of course).

5.2)
probe connection

If the IP address could be resolved in the previous step, probe the connection to the target system using is_up(3) internally.

5.3)
probe operating system

when the connection has been probed successfully, probe the operating system of the target system. This is actually the first test to check if a login to the target system is possible respectively, depending on the protocol, information can be queried from the target system.

5.4)
handle query

if the operating system has been probed successfully in the previous step, handle the job query.

5.4.1)
deploy query payload

if there are payload files present for the job, deploy (copy) the payload files to the target system. Not all protocols might be capable to deploy payload files (see: lib/syspoll/protocols/<VARIANT>/<PLUGIN>).

Payload files are additional programs, scripts or other data that is needed by the query to do its work and are not present on the target system.

5.4.2)
execute query

if a query is defined, execute the query on/for the target system. When queries are written it is important to output all relevant query result data to stdout. Data/information printed to stderr will be seen on the screen but not saved in the outputfile.

If a query could be executed syspoll rates the related target system as processed successfully and it is removed from the retry list.

5.4.3)
clear query payload

remove the deployed files from the target systems again.

6)
execution summary

print an execution summary of the job.

As soon as it is possible, syspoll forecasts a completion of the entire job run based on the elapsed time, the total number of systems to process and the number of already processed target systems. The forecast is adjusted constantly.

syspoll has a plugin mechanism, where new protocols or new variants of protocols can be integrated.

New protocols might be SNMP or a database plugins to connect to PostgreSQL, mySQL, MSSQL or Oracle.

Protocol variants are existing protocols, but customized in the fine details of the connection method and the execution of queries. This might be the case if in a certain compliance situation it is only allowed to execute queries on remote systems using sudo(8). For this a variant of an existing protocol can be created without adjusting jobs.

 

OPTIONS

-h
usage message. Here the revision of syspoll is also displayed.

-c config_file
configuration file.

-r retries[:interval]
number of retries and interval between two immediate connection retries in seconds.

-s setname
set name.

A set is a handle to specify some specific additional general credentials that are valid for a job; as the login credentials used to execute the query and the protocol variant used. With sets it is possible to write a job query and use it without modifications for different target customer environments even if the user names, passwords and the details to connect to the systems change.

When a job is started first with the setname ACME and then with Riptide, for each set an own retry list is maintained. It is intended to use the customer name as setname or a combination of the customer name and the targeted customer environment, as: ACME.TEST.

The default setname is the customer name of the environment where syspoll is started as returned by server_environment -C or default if the set configuration for the customer name does not exist.

A set is represented by a configuration file in the var/syspoll/sets/ directory.

See also: server_environment(3).

-a
action:

start -j jobname [ -s setname ] [ -t hostlist ]

start a job for a given set.

The job header as specified in the JOB_HEADER setting in VARDIR/jobs/<jobname>/job.cfg is written once to the outputfile at the beginning of the job execution when the start action is executed.

retry -j jobname [ -s setname ] [ -t hostlist ]

retry job on failed systems for a given set.

The job header as specified in the JOB_HEADER setting in VARDIR/jobs/<jobname>/job.cfg is not written to the outputfile when the retry action is executed.

list_retry -j jobname [ -s setname ]

print current retry target list for a job for a given set.

list_jobs
list all defined jobs.

list_sets
list all defined sets.

list_prots
list all available protocols and protocol variants.

Currently the protocols SSH (secure shell) and WMI (Windows Management Instrumentation) are distributed with WA2L/edrc for syspoll.

list_perf

list performance statistics of past job runs.

print_log [ -b begin_date ] [ -e end_date ]
print the syspoll log file between the begin_date and the end_date.
If the begin_date is not specified, the log file is printed from the beginning to the end_date. If the end_date is not entered, the log file is printed from the begin_date to the end. If neither of the two dates is specified the whole log is printed.

-j jobname
name of a job to be executed.

-t hostlist
list of target hosts. This list can be a comma separated list (as returned by hostlist -l), a file containing a list of hosts or a hostgroup name ( @HOSTRGOUP ).

The file has to be specified with an absolute path name.

When a dash is specified as hostlist (example: syspoll -a start -j poll -t -) the system target list is read from stdin.

-o outputfile
output file where the query results are saved. It is also possible to capture the query results by redirecting the stdout output of syspoll.

The outputfile has to be specified as an absolute path name. See also: rel2abs(3) to see how to convert a relative path name to an absolute.

-b begin_date

begin date in the military format YYYY-MM-DD. To compute dates in this format, see: input(3), seconds(3), timer(1), today(3), tomorrow(3), yesterday(3).

-e end_date

end date in the military format YYYY-MM-DD. To compute dates in this format, see: input(3), seconds(3), timer(1), today(3), tomorrow(3), yesterday(3).

 

ENVIRONMENT

$SYSPOLL_CONFIGFILE
configuration file of syspoll. The -c configfile command line option has preference.

$PRINT_FIT2WIDTH
If this environment variable is not set to False, the output of lists is limited to the current width of the terminal window and rows extending the window width are marked with '>>'.

 

EXIT STATUS

0
no error.

1
configuration file does not exist.

2
setname does not exist.

3
jobname does not exist.

4
Usage printed.

5
syspoll aborted pressing <Ctrl>+<C>.

6
cannot write to outputfile as specified in -o outputfile .

7
protocol variant as specified in SET_PROTOCOL_VARIANT setting in the set configuration file setname.cfg does not exist

8
cannot write to logfile.

9
cannot write to VARDIR.

11
temporary directory could not be claimed or created in /var/tmp. Check the system temporary directory /var/tmp if you get this error, it is an indicator of system intrusion.

 

FILES

The VARDIR can be defined in the syspoll.cfg file. Default is edrc/var/syspoll/.

etc/syspoll.cfg
default syspoll configuration file.

lib/syspoll/protocols/<VARIANT>/<PLUGIN>
protocol plugins.

lib/syspoll/protocols/edrc/<PLUGIN>
default protocol plugins that profit from the connection setup of WA2L/edrc, where the key files are located in the var/connection/security/ directory.

var/cache/syspoll/
cache files, do not edit them by hand.

var/log/syspoll.log

logfile of syspoll.

VARDIR/jobs/<jobname>/
directory containing the definition of a job.

VARDIR/jobs/<jobname>/job.cfg
some global settings for the job, as JOB_DESCRIPTION and JOB_HEADER.

VARDIR/jobs/<jobname>/<OSDIR>/<PROTOCOL>/query
<OSDIR> ::= <os_name>.<os_release>.<os_machine> | <os_name>.<os_release> | <os_name> | default

Query to be executed on a given operating system and the related protocol (<PROTOCOL>).

The following variables are exported to the query execution: JOB_LOCALUSER, JOB_REMOTEUSER, JOB_PAYLOAD, JOB_QUERY, JOB_PROTOCOL, JOB_PASSWORD, JOB_LOCALTEMP, JOB_POSTQUERY, JOB_HOSTNAME, AWK, ECHO, TAIL and OSID.

VARDIR/jobs/<jobname>/<OSDIR>/<PROTOCOL>/payload/
directory containing additional files that are temporarily needed on the target system to execute the query.

VARDIR/locks/
lockfiles, do not edit them by hand.

VARDIR/sets/<setname>.cfg
set configuration file.

VARDIR/sets/{<SERVER_ENVIRONMENT_CUSTOMER>.cfg|default.cfg}
default set configuration file. If -s setname is not specified the setname defaults first to the customer name of the server environment (<SERVER_ENVIRONMENT_CUSTOMER>) as returned by server_environment -C where syspoll is started, if that .cfg does not exist to default.

VARDIR/state/
state information of syspoll, do not edit those files by hand.

VARDIR/state/<setname>.<jobname>.retry
retry file of systems that were not reached for a jobname in a given set (setname). The retry file contains all target systems that were not reachable plus all remaining systems if syspoll is aborted.

The retry file is reset when -a start is invoked.

When -a retry is issued once or multiple times, systems with a successful retry are removed from the retry file, unsuccessful systems remain in the file.

VARDIR/state/performance
record of job execution durations and success rates.

 

EXAMPLES

As always in WA2L/edrc, if the setup in server_environment.cfg and hostlist.cfg is done, the command runs within the environment without specifying targets. Therefore the options -s setname and -t hostlist can be omitted when the systems that are polled reside in the same environment as the host where syspoll is executed.

Thus, the most simplest invocation of syspoll is:

[ / ]
[ root@acme001 ][*eshell*/bash] syspoll -a start -j bdf 

[ / ]
[ root@acme001 ][*eshell*/bash] syspoll -a retry -j bdf 

The two example jobs referenced in this section are probe and bdf, where probe tests connections to target systems without executing a real query and bdf resolves the file system disk space usage as done by df(1) or bdf(1) and returns the result as csv file having the format 'HOST;FILESYSTEM;TOTAL;FREE;USED;%USED;MOUNTPOINT;'.

1) start the 'probe' job to check target connectivity

The probe job is a job that is considered to be part of the syspoll command (therefore do not change it, create a copy if you need a modified version of it). This job does not have a real query, the purpose of this job is simply to test connections to the given targets and verify that the connection settings are correct.

[ / ]
[ root@acme001 ][*eshell*/bash] syspoll -a start \ 
    -s ACME -j probe \ 
    -t acme002,acme003,acme004

2) start 'bdf' job and save query results to new output file

[ / ]
[ root@acme001 ][*eshell*/bash] syspoll -a start \ 
    -s ACME -j bdf \ 
    -t acme002,acme003,acme004 \ 
    -o /tmp/bdf.csv

3) retry 'bdf' job for failed targets and add query results to existing output file

[ / ]
[ root@acme001 ][*eshell*/bash] syspoll -a retry \ 
    -s ACME -j bdf \ 
    -o /tmp/bdf.csv

4) retry 'bdf' job for additional targets and add query results to existing output file

[ / ]
[ root@acme001 ][*eshell*/bash] syspoll -a retry \ 
    -s ACME -j bdf \ 
    -t acme005,acme006 \ 
    -o /tmp/bdf.csv

5) list current retry list for job 'bdf' in 'ACME' set

[ / ]
[ root@acme001 ][*eshell*/bash] syspoll -a list_retry \ 
    -s ACME -j bdf

6) start a job on targets defined in hostgroup '@WEB'

See also: Example 10).

[ / ]
[ root@acme001 ][*eshell*/bash] syspoll -a list_retry \ 
    -s ACME -j bdf \ 
    -t @WEB

7) start a job on targets defined in a file

[ / ]
[ root@acme001 ][*eshell*/bash] syspoll -a start \ 
    -s ACME -j probe \ 
    -t /tmp/hostlist.txt

8) start a job on targets received from stdin

There is a file having pairs of hostnames and customer names separated by whitespaces:

acme001    ACME
acme002    ACME
websrv01   Bedrock
erp5       Bedrock
acme008    ACME
:

Run the job only on targets that are used for the customer 'ACME':

[ / ]
[ root@acme001 ][*eshell*/bash] \ 
    awk '/\sACME$/{print $1}' < /tmp/assets.lst | \ 
    syspoll -a start -s ACME -j probe -t -

9) start a job on targets defined in a sqlite database

Run the job only on targets that are used for the customer 'ACME':

[ / ]
[ root@acme001 ][*eshell*/bash] sqlite /tmp/assets.db \ 
    "select name from hosts where customer='ACME'" | \
    syspoll -a start -s ACME -j probe -t -

10) start a job on targets defined in hostlist

See also: Example 6).

Using the setting USE_HOSTLIST_DAT=True and CMAN_ENVIRONMENT=Highlander.ADMIN in hostlist.cfg and when syspoll is started on a host that is member of the central management environment Highlander.ADMIN hostlist(3) can be used to address all targets of a certain customer.

Check if logged on to central management environment Highlander.ADMIN :

[ / ]
[ root@adm001 ][*eshell*/bash]: whereami

LOGGED ON TO SERVER ENVIRONMENT:

    Customer                      : Highlander
    Environment                   : ADMIN
    Description                   : Beringen, EDRC Development


Run the job only on targets that are used for the customer 'ACME':

[ / ]
[ root@adm001 ][*eshell*/bash] syspoll -a start \ 
    -s ACME -j bdf -t `hostlist -l -g @ACME.ALL`

11) start 'bdf' job and directly compute query results

Print a formatted list from csv output:

[ / ]
[ root@acme001 ][*eshell*/bash] syspoll -a start \ 
    -s ACME -j bdf | print_list

Print a formatted list from csv output with a reduced set of columns:

[ / ]
[ root@acme001 ][*eshell*/bash] syspoll -a start \ 
    -s ACME -j bdf \ 
    -t acme002,acme003,acme004 | \ 
        select_columns ";" "HOST;MOUNTPOINT;TOTAL" | print_list

Omit status information output during data collection:

[ / ]
[ root@acme001 ][*eshell*/bash] syspoll -a start \ 
    -s ACME -j bdf \ 
    -t acme002,acme003,acme004 \ 
        2>/dev/null | \ 
        select_columns ";" "HOST;MOUNTPOINT;TOTAL" | print_list

12) start a job and provide collected query results on WA2L/edrc:report

See also: Example 13), NOTES.

[ / ]
[ root@acme001 ][*eshell*/bash] syspoll -a start \ 
    -s ACME -j bdf \ 
    -o ~edrc/var/www/report/006/ACME/bdf/acme__bdf_`date +%Y%m%d`.csv

13) crontab entry to handle monthly data collection and provision of results to WA2L/edrc:report

See also: Example 12), NOTES.

In this example the collected query results are saved to the $HOME directory of the user 'report' what allows to access the report output directories thru ~report from shell, scripts etc. independent of the actual userhome location.

Preparations to provide the collected data with WA2L/edrc:report:

1) create the directory structure to save the collected data

  [ / ]
  [ root@acme001 ][*eshell*/bash] mkdir ~report/ACME/bdf/

  [ / ]
  [ root@acme001 ][*eshell*/bash] chmod 755 ~report/ACME/bdf/

2) create a symbolic link from WA2L/edrc:report to the report data

  [ / ]
  [ root@acme001 ][*eshell*/bash] symlink ~report ~edrc/var/www/report/006

Create the crontab entry:

  1 0    25 * * [ -d ~report/ ] && ~edrc/bin/syspoll -a start -s ACME -j bdf \ 
                                   -o ~report/ACME/bdf/acme__bdf_`date +%Y%m%d`.csv > /dev/null 2>&1

  1 2-20 25 * * [ -d ~report/ ] && ~edrc/bin/syspoll -a retry -s ACME -j bdf \ 
                                   -o ~report/ACME/bdf/acme__bdf_`date +%Y%m%d`.csv > /dev/null 2>&1

In this definition the job is started once at 00:01 on every 25th of every month.

Then on the same day the job retries to query the unsuccessful targets every hour between 02:01 and 20:01.

Due to the fact, that syspoll locks a job for a set during execution it also does not create a mess if this job here runs longer then an hour.

The output is saved to the ~report/ACME/bdf/ directory.

The output file uses the reverse date as filename element using the date(1) command acme__bdf_`date +%Y%m%d`.csv what results in a filename of acme__bdf_20130225.csv when executed on February 25th 2013 (see also: http://www.tugsat.tugraz.at/launch).

14) example output of syspoll

Start the bdf job for set ACME and save job query results to /tmp/diskspace.csv:

[ / ]
[ root@acme001 ][*eshell*/bash]: syspoll -a start -j bdf \ 
    -s ACME -t acme001,acme002,acme003,acme004,acme005,acme006 -o /tmp/diskspace.csv

syspoll - poll systems, by Chr. Walther

poll systems ...
    general information ...
        Customer ......... : WA2L
        Environment ...... : [ EDRC_DVLP ] Beringen, EDRC Development
        Action ........... : start
        Hostname ......... : acme001
        Who .............. : root
        Operating System . : Linux acme001 3.13.0-45-generic #74-Ubuntu SMP
        Date ............. : Sat Feb 21 13:08:06 CET 2015
        Revision ......... : 13
        Configfile ....... : /opt/edrc/etc/syspoll.cfg
        VARDIR ........... : /opt/edrc/var/syspoll
        RETRY_COUNTER .... : 2
        RETRY_INTERVAL ... : 2
        OSID ............. : Linux
    done.
    set information ...
        setname .......... : ACME
        description ...... : ACME Hardware Corporation set.
        revision ......... : 00
        protocol variant . : edrc
    done.
    job information ...
        jobname .......... : bdf
        description ...... : disk space
        revision ......... : 00
        outputfile ....... : /tmp/diskspace.csv (create)
    done.
    job header ...
        HOST;FILESYSTEM;TOTAL;FREE;USED;%USED;MOUNTPOINT;
    done.
    connect to systems ...
        host 'acme001' [8/8] ...
            connection information ...
                hostname ......... : acme001
                hostaliases ...... : 
                ipaddress ........ : 10.10.10.11
            done.
            probe connection ...
                up, success.
            done.
            probe operating system ...
                try protocol ...( SSH )... done.
                os name .......... : Linux
                os release ....... : 3.13.0-45-generic
                os machine ....... : x86_64
                protocol ......... : SSH
                local user ....... : edrc
                remote user ...... : root
            done.
            handle query ...
                deploy query payload ...
                    no payload to deploy, skip.
                done.
                execute query ...
                    acme001;/dev/sda6;41151808;17058308;21980068;53.412156;/;
                    acme001;none;4;4;0;0.000000;/sys/fs/cgroup;
                    acme001;udev;1013352;1013348;4;0.000395;/dev;
                    acme001;tmpfs;204832;203556;1276;0.622950;/run;
                    acme001;none;5120;5120;0;0.000000;/run/lock;
                    acme001;none;1024144;1023920;224;0.021872;/run/shm;
                    acme001;none;102400;102364;36;0.035156;/run/user;
                    acme001;/dev/sda1;999320;720620;209888;21.003082;/boot;
                    acme001;/dev/sda2;51475068;2071508;46765736;90.851237;/home;
                done.
                clear query payload ...
                    payload cleared.
                done.
            done.
        done.
        host 'acme002' [7/8] ...
            estimated job completion: 2015-02-21 13:08:24
            connection information ...
                hostname ......... : acme002
                hostaliases ...... : 
                ipaddress ........ : 10.10.10.12
            done.
            probe connection ...
                up, success.
            done.
            probe operating system ...
                try protocol ...( SSH )... done.
                os name .......... : SunOS
                os release ....... : 5.10
                os machine ....... : i86pc
                protocol ......... : SSH
                local user ....... : edrc
                remote user ...... : root
            done.
            handle query ...
                deploy query payload ...
                    no payload to deploy, skip.
                done.
                execute query ...
                    <<< OUTPUT TO BE ADDED >>>
                done.
                clear query payload ...
                    payload cleared.
                done.
            done.
        done.
        host 'acme003' [6/8] ...
            estimated job completion: 2015-02-21 13:08:24
            connection information ...
                hostname ......... : acme003
                hostaliases ...... : 
                ipaddress ........ : 10.10.10.13
            done.
            probe connection ...
                up, success.
            done.
            probe operating system ...
                try protocol ...( SSH )... done.
                os name .......... : AIX 
                os release ....... : 6.1 
                os machine ....... : powerpc
                protocol ......... : SSH
                local user ....... : edrc
                remote user ...... : root
            done.
            handle query ...
                deploy query payload ...
                    no payload to deploy, skip.
                done.
                execute query ...
                    <<< OUTPUT TO BE ADDED >>>
                done.
                clear query payload ...
                    payload cleared.
                done.
            done.
        done.
        host 'acme004' [5/8] ...
            estimated job completion: 2015-02-21 13:08:24
            connection information ...
                hostname ......... : acme004
                hostaliases ...... : 
                ipaddress ........ : 10.10.10.14
            done.
            probe connection ...
                up, success.
            done.
            probe operating system ...
                try protocol ...( SSH )... done.
                os name .......... : HP-UX
                os release ....... : B.11.31 
                os machine ....... : ia64
                protocol ......... : SSH
                local user ....... : edrc
                remote user ...... : root
            done.
            handle query ...
                deploy query payload ...
                    no payload to deploy, skip.
                done.
                execute query ...
                    <<< OUTPUT TO BE ADDED >>>
                done.
                clear query payload ...
                    payload cleared.
                done.
            done.
        done.
        host 'acme005' [4/8] ...
            estimated job completion: 2015-02-21 13:08:22
            connection information ...
                hostname ......... : acme005
                hostaliases ...... : 
                ipaddress ........ : 10.10.10.15
            done.
            probe connection ...
                up, success.
            done.
            probe operating system ...
                try protocol ...( SSH WMI )... done.
                os name .......... : Windows
                os release ....... : 2012
                os machine ....... : 
                protocol ......... : WMI
                local user ....... : edrc
                remote user ...... : root
            done.
            handle query ...
                deploy query payload ...
                    no payload to deploy, skip.
                done.
                execute query ...
                    <<< OUTPUT TO BE ADDED >>>
                done.
                clear query payload ...
                    payload cleared.
                done.
            done.
        done.
        host 'acme006' [3/8] ...
            estimated job completion: 2015-02-21 13:08:22
            connection information ...
                hostname ......... : acme006
                hostaliases ...... : 
                ipaddress ........ : 
            done.
            probe connection ...
                cannot resolve ip address, skip.
            fail.
            probe operating system ...
                connection probe failed, skip.
            fail.
            handle query ...
                operating system probe failed, skip.
            fail.
        fail.
        host 'acme007' [2/8] ...
            estimated job completion: 2015-02-21 13:08:23
            connection information ...
                hostname ......... : acme007 
                hostaliases ...... : 
                ipaddress ........ : 10.10.10.17
            done.
            probe connection ...
                cannot connect, wait . retry
                cannot connect, wait . retry
                not up, fail.
            fail.
            probe operating system ...
                connection probe failed, skip.
            fail.
            handle query ...
                operating system probe failed, skip.
            fail.
        fail.
        host 'acme008' [1/8] ...
            estimated job completion: 2015-02-21 13:08:54
            connection information ...
                hostname ......... : acme008 
                hostaliases ...... : www.acme.com www.acme.ch  
                ipaddress ........ : 10.10.10.18
            done.
            probe connection ...
                up, success.
            done.
            probe operating system ...
                try protocol ...( SSH WMI )... done.
                os name .......... : unknown
                os release ....... : unknown
                os machine ....... : unknown
                protocol ......... : unknown
            fail.
            handle query ...
                operating system probe failed, skip.
            fail.
        fail.
    done.
    execution summary ...
        failure for: acme006,acme007,acme008
        unknown for: 
        summary: success/failure/unknown/total 5/3/0/8
    done.
done.

List targets in retry list:

[ / ]
[ root@acme001 ][*eshell*/bash]: syspoll -a list_retry -j bdf -s ACME

syspoll - poll systems, by Chr. Walther

HOSTNAME
--------
acme006 
acme007 
acme008 
(1)

List performance information:

[ / ]
[ root@acme001 ][*eshell*/bash]: syspoll -a list_perf

syspoll - poll systems, by Chr. Walther

SET       JOB        t/RUN     t/TARGET  SUCCESS_RATE  RUNS  TARGETS  LAST_RUN             
--------  ---------  --------  --------  ------------  ----  -------  -------------------
ACME      bdf         0:03:35   0:00:26       62.50 %     1        8  2015-02-21 13:08:06
WA2L      bdf         0:00:08   0:00:02       85.71 %     2        7  2015-02-21 13:06:39
WA2L      probe       0:00:26   0:00:07       15.00 %     6       20  2015-02-21 11:43:12
default   probe       0:00:01   0:00:00        0.00 %     1        3  2015-02-20 23:54:50
(4)

Retry job on failed targets and add additional query results to /tmp/diskspace.csv :

[ / ]
[ root@acme001 ][*eshell*/bash]: syspoll -a retry -j bdf -s ACME -o /tmp/diskspace.csv

syspoll - poll systems, by Chr. Walther

poll systems ...
    general information ...
        Customer ......... : WA2L
        Environment ...... : [ EDRC_DVLP ] Beringen, EDRC Development
        Action ........... : retry
        Hostname ......... : acme001
        Who .............. : root
        Operating System . : Linux acme001 3.13.0-45-generic #74-Ubuntu SMP
        Date ............. : Sam Feb 21 13:51:09 CET 2015
        Revision ......... : 13
        Configfile ....... : /opt/edrc/etc/syspoll.cfg
        VARDIR ........... : /opt/edrc/var/syspoll
        RETRY_COUNTER .... : 2
        RETRY_INTERVAL ... : 2
        OSID ............. : Linux
    done.
    set information ...
        setname .......... : ACME
        description ...... : ACME Hardware Corporation set.
        revision ......... : 00
        protocol variant . : edrc
    done.
    job information ...
        jobname .......... : bdf
        description ...... : disk space
        revision ......... : 00
        outputfile ....... : /tmp/diskspace.csv (append)
    done.
    job header ...
        HOST;FILESYSTEM;TOTAL;FREE;USED;%USED;MOUNTPOINT;
    done.
    connect to systems ...
        host 'acme006' [3/3] ...
            connection information ...
                hostname ......... : acme006
                hostaliases ...... : 
                ipaddress ........ : 
            done.
            probe connection ...
                cannot resolve ip address, skip.
            fail.
            probe operating system ...
                connection probe failed, skip.
            fail.
            handle query ...
                operating system probe failed, skip.
            fail.
        fail.
        host 'acme006' [2/3] ...
            estimated job completion: 2015-02-21 13:08:22
            connection information ...
                hostname ......... : acme007
                hostaliases ...... : 
                ipaddress ........ : 10.10.10.16
            done.
            probe connection ...
                up, success.
            done.
            probe operating system ...
                try protocol ...( SSH )... done.
                os name .......... : Linux
                os release ....... : 3.13.0-45-generic
                os machine ....... : x86_64
                protocol ......... : SSH
                local user ....... : edrc
                remote user ...... : root
            done.
            handle query ...
                deploy query payload ...
                    no payload to deploy, skip.
                done.
                execute query ...
                    acme007;/dev/sda6;41151808;17060952;21977424;53.405731;/;
                    acme007;none;4;4;0;0.000000;/sys/fs/cgroup;
                    acme007;udev;1013352;1013348;4;0.000395;/dev;
                    acme007;tmpfs;204832;203560;1272;0.620997;/run;
                    acme007;none;5120;5120;0;0.000000;/run/lock;
                    acme007;none;1024144;1023920;224;0.021872;/run/shm;
                    acme007;none;102400;102364;36;0.035156;/run/user;
                    acme007;/dev/sda1;999320;720620;209888;21.003082;/boot;
                    acme007;/dev/sda2;51475068;2068184;46769060;90.857694;/home;
                done.
                clear query payload ...
                    payload cleared.
                done.
            done.
        done.
        host 'acme008' [1/3] ...
            estimated job completion: 2015-02-21 13:08:54
            connection information ...
                hostname ......... : acme008 
                hostaliases ...... : www.acme.com www.acme.ch  
                ipaddress ........ : 10.10.10.18
            done.
            probe connection ...
                up, success.
            done.
            probe operating system ...
                try protocol ...( SSH WMI )... done.
                os name .......... : unknown
                os release ....... : unknown
                os machine ....... : unknown
                protocol ......... : unknown
            fail.
            handle query ...
                operating system probe failed, skip.
            fail.
        fail.
    done.
    done.
    execution summary ...
        failure for: acme006
        unknown for: 
        summary: success/failure/unknown/total 1/2/0/3
    done.
done.

List targets in retry list:

[ / ]
[ root@acme001 ][*eshell*/bash]: syspoll -a list_retry -j bdf -s ACME

syspoll - poll systems, by Chr. Walther

HOSTNAME
--------
acme006 
acme008 
(1)

 

SEE ALSO

edrcintro(1), edrcinit(1m), csv2worksheet(3), hostlist(3), input(3), is_up(3), osid(3), print_list(3), rcmd(1), rel2abs(3), scp(1), seconds(3), server_environment(3), ssh(1), ssh-exec(1), syspoll.cfg(4), timer(1), today(3), tomorrow(3), WA2Ledrc.report(1), whereami(1), wmic(1), yesterday(3)

 

NOTES

To serve reports with the web application 'WA2L/edrc:report - The Operating System Report Portal' included in WA2L/edrc, write the reports to a directory structure having the convention <YOUR_REPORTBASE>/<SERVER_ENVIRONMENT_CUSTOMER>/<reportname>/<outputfile> and the world readable flag set. Then create a symbolic link using symlink(1) from var/www/report/rpt/<NUMBER> to <YOUR_REPORTBASE>.

See also: Example 12) and 13) in EXAMPLES, WA2Ledrc:report(1), edrcinit(1m), and 'http://hostname:9900 -> Help' for more information about WA2L/edrc:report.

 

BUGS

Abort handling is fully tested under Linux only. Therefore when running syspoll on other operating systems, refrain from aborting a running syspoll session if possible. However, the expected side effects are not severe.

 

AUTHOR

syspoll was developed by Christian Walther. Send suggestions and bug reports to wa2l@users.sourceforge.net .

 

COPYRIGHT

Copyright © 2015 Christian Walther

This is free software; see edrc/doc/COPYING for copying conditions. There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


 

Index

NAME
SYNOPSIS
AVAILABILITY
DESCRIPTION
OPTIONS
ENVIRONMENT
EXIT STATUS
FILES
EXAMPLES
SEE ALSO
NOTES
BUGS
AUTHOR
COPYRIGHT

This document was created by man2html using the manual pages.
Time: 13:15:31 GMT, March 12, 2025