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!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...