Get a nice success notification message from trigger - mysql

I'm trying since two weeks to get a success message from MySQL.
For example, in PHPmyadmin if you set a trigger containing the following line
SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = "My personal error text"
You get a nice red error and the execution is cancelled
I want to get a nice green message on execution to notify that one of my condition has been met IF new.city=='CHICAGO'
Any Idea? i'm searching since 2 weeks now
I we can get an error message, can we get a success message?
A success message from phpmyAdmin
An error i created

Sorry, that's not something phpMyAdmin is designed to do -- you're trying to find a way to hook in to the messaging system in a way that phpMyAdmin isn't expecting. For that matter, MySQL doesn't really expect you to send success messages; only in the case of failure.

Related

Zabbix - Display last error message of web scenario in trigger description

i want to display web scenario's last error message in trigger description. I have tried this configs, but it displaying only 0 or 1 of failed step. How can i show error message in description?
Expression;
length(last(/Healthcheck/web.test.fail[Healthchecktest],#2))>0 and last(/Healthcheck/web.test.fail[Healthchecktest],#2)=1
Description;
Web scenario "Scenario" failed: {ITEM.VALUE}
As this configuration desc. displaying like;

RTweet new lookup_users continued excess error

I was using R's RTweet lookup_users to successfully pull data on 6 IDs
test<-c("ID1","ID2","ID3","ID4","ID5","ID6")
detail_followers <- lookup_users(users=test,
parse=TRUE,
token=[bearer_token here],
retryonratelimit=TRUE,
verbose=TRUE)
Update: I created a loop so I could get more visibility on the run, which made it profoundly slow. This would be tolerable, except for two new problems. First, some lookup_user are missing the "profile_banner_url" variable. I built a function to check for this problem and insert a NULL value for those users missing it, further slowing the run.
Finally, many users in this set appear to be bots, as they are deleted within 24 hours of my having just pulled them from the API. The error provided from lookup_users is "Error: $ operator is invalid for atomic vectors". is.atomic eval is not useful, because the fault occurs when lookup_user is called. There are far too many of these fake/suspended/deleted users for manual prompts.
These may be issues with the new RTweet from GitHub.

Invalid Syntax Infinite Loop

In the Access query builder, as I am entering a formula, if there is a syntax error, I will get the usual error message stating "The expression you entered contains invalid syntax." The problem is, when I click "OK" the message comes back again, and again, and again. It it an infinite loop and the only way I have found to get out of it is filling MS Access in the task manager. Of course I lose all my unsaved work to that point.
Also happens for other syntax errors like "The expression you entered has an invalid string."
I am attaching screenshots for reference, but please do not get hung up on the syntax. I realize the syntax is not valid, it is the infinite loop of errors that results from them that is the issue.
Sample of Error
Sample of Error #2
This has been happening for a while now. Any help anyone could provide would be most appreciated.
PS. I tried this against an empty table with the same results. So it is not a case of Access trying to validate the syntax against all records in the table.

Zabbix Triggers iregex expression validation

I am a beginner in zabbix agent.I would like to know if the below trigger is syntactically correct? If yes then how do I know if the trigger is fired ?
I am not able to receive email notifications.Kindly help me .
{MDMCenter:eventlog[761848].iregexp("Job.Execute() failed. (ex.Message = System.Exception: Exception: Failed in Batch: [1] of \[[0-9]*\] ---> System.Exception: Exception: Failed in Batch: [1] of \[[0-9]*\]] ---> System.IO.IOException: The network name cannot be found.")}
The expression as you have it here seems to be invalid - looks like you have accidentally added some example value inside the function parameters.
You can look for the trigger firing on the dashboard or in the Monitoring -> Triggers page.
In general, before even looking at triggers, verify that data is coming in and that the values match your expectations. If some trigger still does not seem to work, always provide exact trigger expression and a few example values, as well as all the things you have checked (server being running, item values being recent and so on).

zabbix regex to trigger for wrong data type

I have an item of type float, but sometimes a string is received in case of error instead of a number. How can I make a trigger regexp to fire in this case?
I have no idea now to check for "wrong data type".
Actually this is by design and what I'm trying to do is this: if the data gathering fails, I send an error message in order to see it on zabbix end.
I tried with nodata(0), but this doesn't seem to work.
In you case zabbix will not store the "wrong" value for the item. And if you don't care what the string is then you can just setup a trigger for "nodata" for the period of your interval. Look in the triggers manual and search for the "nodata".
Edit: scratch that, didn't read the whole question ....
Edit2: if you are certain that this is not working by design and not because your trigger interval misses the data interval, then you can try to catch the unsupported status. There is an open request for the functionality, but you can setup a side script similar to this. Or you can wrap the monitored item on the node into a UserParameter script that reads the value and prints -1 or something if it is not a number. Then proceed with a normal numeric trigger.