JFIFxxC      C  " }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr O6ufL:ddlmZddlmZddlmZmZmZmZm Z GddeZ Gdde eZ Gdd e eeZ y ) )match)quote)Plugin RedHatPlugin DebianPlugin UbuntuPlugin PluginOptceZdZdZdZdZdZdZdZdZ dZ d diZ e d d d e ddd e ddd gZ dZdZdZdZddZdZy)Foremanz$Foreman/Satellite systems managementforemani)sysmgmt)r N localhost PGPASSWORDdaysz!number of days for dynflow output)defaultdesc proxyfeaturesFz!collect features of smart proxiespuma-gczcollect Puma GC statsz/pumactl %s -S /usr/share/foreman/tmp/puma.statecbd} d}t|dd5}|jj}dddD]}|r|ddk(r|jdrd }"|r$t d |r|j d |_|r$t d |r|j d |_|jd rd} |jjdr|jjds6|jjdr/|jjdr|jd d|_d|ji|_ |jddddd|jddg|jdd}|j}|jdd}|j}|jdd|j dgd|jdd d!d"d#d$d%d&d'd(d)d*d+d,d|j d-d|j d.d|j d/d0|j d1d0|j d2d|j d3g|j#d4d5d6d7d8d9d:d;|d;|d?|j#d@dAdBC|j#dDdE?|j%dFdG?|j'dHI|j)dJr |j#|j*dKzdL?|j#|j*dMzdN?|j#dO|j-dP}|j#|dQ|jR|j/|j1y#1swYcxYw#t$rYwxYw)SNFz/etc/foreman/database.ymlrzUTF-8)encodingr#z production:Tz\s+host:\s+\S+z\s+password:\s+\S+ "'rforeman_production_logforeman_tasks_configforeman_ssl_access_ssl_log)z!/var/log/foreman/production.log.*z/etc/sysconfig/foreman-tasks/etc/sysconfig/dynflowdz)/var/log/httpd/foreman-ssl_access_ssl.logz/etc/foreman/*key.pemz/etc/foreman/encryption_key.rbhostnameoutputz hostname -fz/var/log/foreman/production.logz /var/log/z*/foreman-ssl_*_ssl.log) sizelimitz /etc/foreman/z/etc/sysconfig/foremanr#z/etc/default/foremanz&/var/log/foreman/dynflow_executor*log*z*/var/log/foreman/dynflow_executor*.output*z#/var/log/foreman/apipie_cache*.log*z/var/log/foreman/cron*.log*z /var/log/foreman/db_migrate*log*z/var/log/foreman/db_seed*log*z$/var/log/foreman/production.log[.-]*z$/var/log/foreman-selinux-install.logz&/var/log/foreman-proxy-certs-generate*z/usr/share/foreman/Gemfile*z */foreman*z&*/katello-reverse-proxy_error_ssl.log*z */error_log*z/etc/z*/conf/z */conf.d/z'*/katello-reverse-proxy_access_ssl.log*zforeman-selinux-relabel -nvzpassenger-status --show poolz passenger-status --show requestsz"passenger-status --show backtraceszpassenger-memory-statszls -lanR /root/ssl-buildz(ls -lanR /usr/share/foreman/config/hooksz ping -c1 -W1 zping -c1 -W1 localhostzqpid-stat -b amqps://localhost:5671 -q --ssl-certificate=/etc/pki/katello/qpid_router_client.crt --ssl-key=/etc/pki/katello/qpid_router_client.key --sasl-mechanism=ANONYMOUSz qpid-stat_-q)suggest_filenamez hammer ping hammer_pingx)tagstimeoutzsystemctl list-units dynflow* dynflow_unitsz!"system-dynflow\x2dsidekiq.slice"dynflow_sidekiq_statuszdynflow-sidekiq@*)unitsrzgc-statszpumactl_gc-statsstats pumactl_statsz/usr/sbin/foreman-puma-statusa[SELECT table_name, pg_size_pretty(total_bytes) AS total, pg_size_pretty(index_bytes) AS INDEX , pg_size_pretty(toast_bytes) AS toast, pg_size_pretty(table_bytes) AS TABLE FROM ( SELECT *, total_bytes-index_bytes-COALESCE(toast_bytes,0) AS table_bytes FROM (SELECT c.oid,nspname AS table_schema, relname AS TABLE_NAME, c.reltuples AS row_estimate, pg_total_relation_size(c.oid) AS total_bytes, pg_indexes_size(c.oid) AS index_bytes, pg_total_relation_size(reltoastrelid) AS toast_bytes FROM pg_class c LEFT JOIN pg_namespace n ON n.oid = c.relnamespace WHERE relkind = 'r') a) a order by total_bytes DESCforeman_db_tables_sizes)r'env)openread splitlines startswithrsplitdbhostdbpasswdIOErrorendswithr2 add_file_tagsadd_forbidden_pathexec_cmdstrip add_copy_spec apachepkgadd_cmd_outputadd_service_status add_journal get_optionpumactlbuild_query_cmdcollect_foreman_dbcollect_proxies) selfproduction_scope foreman_dbdfile foreman_linesline _hostname_host_f_cmds ?      $ % " 4 8 1 ) . + 2 2 4 )'z 2''M N'| 4DNN#7 +DNN#9 -''N O)  .  ) * . 0 $ & 6I; 'G9 % $    0,   M sK ;-<  >  D1I  K 23 ??9 %    z 91C  E DLL72-<  > ;<##   D3L $  * ! M : :    s.N!NB N!=N!NN!! N.-N.c |jdd}t|}d}d|d}d|d}d|d}d |d}d }|d d d dd|dd} ||||d} | jD]6\} } |j| } |j | | dd|j 8|j d}| jD]D\}} d}|dk7r|rd}|j| d|} |j | |dd|j Fy)z% Collect foreman db and dynflow data rz dayszRselect id,name,value from settings where name not similar to '%(pass|key|secret)%'zFselect * from foreman_tasks_tasks where started_at > NOW() - interval z order by started_at asczselect dynflow_execution_plans.* from foreman_tasks_tasks join dynflow_execution_plans on (foreman_tasks_tasks.external_id = dynflow_execution_plans.uuid::varchar) where foreman_tasks_tasks.started_at > NOW() - interval z, order by foreman_tasks_tasks.started_at asczselect dynflow_actions.* from foreman_tasks_tasks join dynflow_actions on (foreman_tasks_tasks.external_id = dynflow_actions.execution_plan_uuid::varchar) where foreman_tasks_tasks.started_at > NOW() - interval zselect dynflow_steps.* from foreman_tasks_tasks join dynflow_steps on (foreman_tasks_tasks.external_id = dynflow_steps.execution_plan_uuid::varchar) where foreman_tasks_tasks.started_at > NOW() - interval zWITH prefix_counts AS (SELECT split_part(name,'::',1) FROM fact_names) SELECT COUNT(*), split_part AS "fact_name_prefix" FROM prefix_counts GROUP BY split_part ORDER BY count DESC LIMIT 100zselect * from schema_migrationsz`select id,type,name,host,port,account,base_dn,attr_login,onthefly_register,tls from auth_sourcesz!select * from dynflow_schema_infozselect count(*) from auditszselect count(*) from logsz2select name,url,download_policy from smart_proxies)foreman_settings_tableforeman_schema_migrationsforeman_auth_tabledynflow_schema_infoaudits_table_countlogs_table_countfact_names_prefixes smart_proxies)foreman_tasks_tasksdynflow_execution_plansdynflow_actions dynflow_stepsiXd)r'r+r&r2z dynflow-utilspsqlr^z /usr/libexec/psql-msgpack-decodeT)csvbinaryN)rEritemsrGrBr2 is_installed)rJrintervalscmddtaskcmddyncmd dactioncmd dstepscmd factnamescmd foremandb foremancsvtablevalrRdynutilsdynres rSrHzForeman.collect_foreman_dbs//&)*%0;  $ ((0z1IK -.6J71 1 BCKL;;  ABJ K: :   '+)J#6$G"? ;#/2  "$,'-)&  $//+ =JE3'',D   uc*-488  = =$$_5"((* =HCF++;''f'ED   sC*-488  =  =cV|jdr|jdd}|j||j}|ddk(rM|dj d d D]4}|j d }d |d d }|j ||ddd6|jddgy )z Collect foreman proxies rz"select name,url from smart_proxiesT)rd)r2statusrr%rN,zNcurl -s --key /etc/foreman/client_key.pem --cert /etc/foreman/client_cert.pem z /v2/featuressmart_proxies_features )r'subdirr+ http_proxy https_proxy)rErGr>r2r5r7rB add_env_var)rJrRproxiesproxys rSrIzForeman.collect_proxiess ??? +''(L,0(2DmmDdhhm7Gx A%$X.99;AB?4E!KK,EB#AhZ|5D''uQx/G02(4 4 , 67rucL|rd|d}d}|||jt|fzS)aI Builds the command needed to invoke the pgsql query as the postgres user. The query requires significant quoting work to satisfy both the shell and postgres parsing requirements. Note that this will generate a large amount of quoting in sos logs referencing the command being run zCOPY (z6) TO STDOUT WITH (FORMAT 'csv', DELIMITER ',', HEADER)z:%s --no-password -h %s -p 5432 -U foreman -d foreman -c %s)r8r)rJqueryrdre_dbcmds rSrGzForeman.build_query_cmd*s; UG$AAEMeEl;;;rucP|jddd|jdddy)Nz/etc/foreman/(.*)((conf)(.*)?)z5((\:|\s*)(passw|cred|token|secret|key).*(\:\s|=))(.*)z \1********z"/etc/foreman/(.*)((yaml|yml)(.*)?)z \1"********")do_path_regex_sub)rJs rSpostproczForeman.postproc8s2  - D    1 D  ru)Frc)__name__ __module__ __qualname__ short_desc plugin_nameplugin_timeoutprofilespackagesrAr8r9r2r option_listrFrTrHrIrGrrurSr r s7JKNHHI FH  C&": </5: <)U. 0 K@GN`Y=v8. < rur c"eZdZdZfdZxZS) RedHatForemanhttpdcj|jddit| |jdy)Nz"/usr/share/foreman/.ssh/ssh_configssh_foreman_configzgem list)r<superrTrB)rJ __class__s rSrTzRedHatForeman.setupKs5  02F     J'ru)rrrrArT __classcell__)rs@rSrrGsI((rurceZdZdZy) DebianForemanapache2N)rrrrArrurSrrUsIrurN) rershlexrsos.report.pluginsrrrrr r rrrrurSrsD99ofoj (G\ (G\<ru