Fixing syntax errors in aliases
In the LinuxMonitor ZenPack, there are syntax errors that need to be manually fixed in order for Analytics to perform data extraction. Perform the following procedure:
Log in to the Resource Manager master as root or a user with
superuser permissions and execute the following command:
serviced service attach zope/0
Change to the zenoss user and navigate to the indicated folder:
su - zenoss cd /opt/zenoss/ZenPacks/ZenPacks.zenoss.ZenETL-<Version>-py2.7.egg/ZenPacks/zenoss/ZenETL/binwhere <Version> is the version of the ZenETL ZenPack that was installed.
Execute the following commands to run the dumpAliases script, make the
necessary changes, and commit the changes:
./dumpAliases.py --aliases=with egrep "(mem_buffers__pct|mem_cached__pct|mem_free__pct|mem_swap_free__pct|lvm_pv_free__pct|lvm_vg_free__pct)" aliases.txt > aliases_changes.txt sed -i 's/,\*,100/,100,\*/' aliases_changes.txt ./manageAliases.py --action=add --inputFile=aliases_changes.txt --commit exit exit
Execute the following commands to stop the zenperfetl service, remove
the disk cache that does not get cleared on restart, and then start the
serviced service stop zenperfetl rm -rf /opt/serviced/var/volumes/<tenantid>/etl-analytics/zenperfetl/perf-config-cache serviced service start zenperfetl
Wait until the new PERFORMANCE extractor has registered with Analytics. You can check this by an ssh connection to the Analytics server and
then opening the mysql console and entering the following command.
select * from meta_extractor where extractor_name = 'PERFORMANCE';You will know the extractor has registered properly when the previous command returns only one row.
Get the key of the new extractor by executing the following command:
select extractor_key into @extractor_key from meta_extractor where extractor_name = 'PERFORMANCE';
Update all existing performance batches to have the new key:
update meta_batch set extractor_key = @extractor_key where extractor_key != @extractor_key and extractor_key in (select extractor_key from meta_extractor where extractor_type = 'PERFORMANCE');
Remove all the old performance extractors:
delete from meta_extractor where extractor_name like '%/_%';