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!

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...