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!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

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