-
Re: Custom Poller Alert - SQL Error All Of A Sudden
zackmDec 16, 2013 8:02 AM (in response to acherman)
The issue is that there is a 'Status' column present in both tables, and you need to identify which one you want to 'SELECT'
Try this:
SELECT STATUS.STATUS FROM CustomPollerAssignment AS Assignment ,CustomPollerStatus AS STATUS WHERE Assignment.CustomPollerAssignmentID = STATUS.CustomPollerAssignmentID AND Assignment.NodeID = 530 AND Assignment.AssignmentName LIKE'CVMupsPowerSource%'
Or, to fix your alert:
UPS has been ${SQL:Select Status.Status From CustomPollerAssignment as Assignment, CustomPollerStatus as Status where Assignment.CustomPollerAssignmentID = Status.CustomPollerAssignmentID and Assignment.NodeID = ${NodeID} and Assignment.AssignmentName like 'CVMupsPowerSource%'} for 60 minutes.
Please note: the only change was to your SELECT statement. Status.Status = Table.ColumnName = CustomPollerStatus.Status
You were very close on your fix attempt, but I am assuming you want the status of the actual polled device and not whether or not the the poller is turned on. (CustomerPollerStatus vs CustomPollerAssignment)
FYI - for future reference: "ambiguous column name" errors are *always* (to my knowledge) fixed by identifying a column in your SELECT statement.
Please let me know if this works and/or you have any questions!
-
Re: Custom Poller Alert - SQL Error All Of A Sudden
acherman Dec 16, 2013 8:33 PM (in response to zackm)Zach, you are my hero!! That worked perfectly. Thanks so much.
Now, I have to wonder, what changed? I have 8 alerts running this same query - 4 of them run it 3 times, and 4 of then run it 4 times, all to produce the UPS values I want in my alerts. And these have been running fine the way they were for 4+ years. So, somewhere, something had to change.
Thanks again.
-