All Apps and Add-ons

Splunk CiscoUCS TA Python Error: SyntaxError: invalid syntax

trademarq
Explorer

I’m trying to bring up the Cisco UCS app, and Splunk seems to be unhappy with the python scripted input.

06-24-2014 10:21:30.524 -0400 ERROR ExecProcessor - message from "python /opt/splunkforwarder/etc/apps/Splunk_TA_CiscoUCS/bin/Collect.py equipmentFex equipmentIOCard equipmentSwitchCard equipmentChassis equipmentPsu computeBlade computeRackUnit fabricDceSwSrvEp etherPIo fabricEthLanEp fabricEthLanPc fabricEthLanPcEp fabricVlan fabricVsan lsServer vnicEtherIf vnicFcIf storageLocalDisk firmwareRunning statsCollectionPolicy"   File "/opt/splunkforwarder/etc/apps/Splunk_TA_CiscoUCS/bin/Collect.py", line 49
06-24-2014 10:21:30.524 -0400 ERROR ExecProcessor - message from "python /opt/splunkforwarder/etc/apps/Splunk_TA_CiscoUCS/bin/Collect.py equipmentFex equipmentIOCard equipmentSwitchCard equipmentChassis equipmentPsu computeBlade computeRackUnit fabricDceSwSrvEp etherPIo fabricEthLanEp fabricEthLanPc fabricEthLanPcEp fabricVlan fabricVsan lsServer vnicEtherIf vnicFcIf storageLocalDisk firmwareRunning statsCollectionPolicy"     with open(os.path.join(APP_PATH, 'local', 'credentials.csv'), 'r') as f:
06-24-2014 10:21:30.524 -0400 ERROR ExecProcessor - message from "python /opt/splunkforwarder/etc/apps/Splunk_TA_CiscoUCS/bin/Collect.py equipmentFex equipmentIOCard equipmentSwitchCard equipmentChassis equipmentPsu computeBlade computeRackUnit fabricDceSwSrvEp etherPIo fabricEthLanEp fabricEthLanPc fabricEthLanPcEp fabricVlan fabricVsan lsServer vnicEtherIf vnicFcIf storageLocalDisk firmwareRunning statsCollectionPolicy"             ^
06-24-2014 10:21:30.524 -0400 ERROR ExecProcessor - message from "python /opt/splunkforwarder/etc/apps/Splunk_TA_CiscoUCS/bin/Collect.py equipmentFex equipmentIOCard equipmentSwitchCard equipmentChassis equipmentPsu computeBlade computeRackUnit fabricDceSwSrvEp etherPIo fabricEthLanEp fabricEthLanPc fabricEthLanPcEp fabricVlan fabricVsan lsServer vnicEtherIf vnicFcIf storageLocalDisk firmwareRunning statsCollectionPolicy" SyntaxError: invalid syntax
06-24-2014 10:21:40.529 -0400 ERROR ExecProcessor - message from "python /opt/splunkforwarder/etc/apps/Splunk_TA_CiscoUCS/bin/Collect.py faultInst"   File "/opt/splunkforwarder/etc/apps/Splunk_TA_CiscoUCS/bin/Collect.py", line 49
06-24-2014 10:21:40.529 -0400 ERROR ExecProcessor - message from "python /opt/splunkforwarder/etc/apps/Splunk_TA_CiscoUCS/bin/Collect.py faultInst"     with open(os.path.join(APP_PATH, 'local', 'credentials.csv'), 'r') as f:
06-24-2014 10:21:40.529 -0400 ERROR ExecProcessor - message from "python /opt/splunkforwarder/etc/apps/Splunk_TA_CiscoUCS/bin/Collect.py faultInst"             ^
06-24-2014 10:21:40.529 -0400 ERROR ExecProcessor - message from "python /opt/splunkforwarder/etc/apps/Splunk_TA_CiscoUCS/bin/Collect.py faultInst" SyntaxError: invalid syntax
06-24-2014 10:21:50.532 -0400 ERROR ExecProcessor - message from "python /opt/splunkforwarder/etc/apps/Splunk_TA_CiscoUCS/bin/Collect.py topSystem equipmentChassisStats computeMbPowerStats computeMbTempStats processorEnvStats equipmentPsuStats adaptorVnicStats etherErrStats etherLossStats etherRxStats etherPauseStats etherTxStats swSystemStats"   File "/opt/splunkforwarder/etc/apps/Splunk_TA_CiscoUCS/bin/Collect.py", line 49
06-24-2014 10:21:50.532 -0400 ERROR ExecProcessor - message from "python /opt/splunkforwarder/etc/apps/Splunk_TA_CiscoUCS/bin/Collect.py topSystem equipmentChassisStats computeMbPowerStats computeMbTempStats processorEnvStats equipmentPsuStats adaptorVnicStats etherErrStats etherLossStats etherRxStats etherPauseStats etherTxStats swSystemStats"     with open(os.path.join(APP_PATH, 'local', 'credentials.csv'), 'r') as f:
06-24-2014 10:21:50.532 -0400 ERROR ExecProcessor - message from "python /opt/splunkforwarder/etc/apps/Splunk_TA_CiscoUCS/bin/Collect.py topSystem equipmentChassisStats computeMbPowerStats computeMbTempStats processorEnvStats equipmentPsuStats adaptorVnicStats etherErrStats etherLossStats etherRxStats etherPauseStats etherTxStats swSystemStats"             ^
06-24-2014 10:21:50.532 -0400 ERROR ExecProcessor - message from "python /opt/splunkforwarder/etc/apps/Splunk_TA_CiscoUCS/bin/Collect.py topSystem equipmentChassisStats computeMbPowerStats computeMbTempStats processorEnvStats equipmentPsuStats adaptorVnicStats etherErrStats etherLossStats etherRxStats etherPauseStats etherTxStats swSystemStats" SyntaxError: invalid syntax

The syntax error appears to be with this line, but it looks okay to me:

with open(os.path.join(APP_PATH, 'local', 'credentials.csv'), 'r') as f:

0 Karma
1 Solution

trademarq
Explorer

I figured this one out on my own. A temporary lapse in my instruction following skills caused this error: The Splunk_TA_CiscoUCS app MUST be run on a Splunk Lightweight Forwarder, Heavy Forwarder, or other full Splunk instance. I was attempting to run it on a Universal Forwarder, and from there I got the weird error message. Running the app on a full instance as noted in the documentation solved this issue.

View solution in original post

trademarq
Explorer

I figured this one out on my own. A temporary lapse in my instruction following skills caused this error: The Splunk_TA_CiscoUCS app MUST be run on a Splunk Lightweight Forwarder, Heavy Forwarder, or other full Splunk instance. I was attempting to run it on a Universal Forwarder, and from there I got the weird error message. Running the app on a full instance as noted in the documentation solved this issue.

Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...