Is it possible to run a pre-configured query on MS SQL Server via Slack message?
When I send a message in a specific channel like "run sql" is it possible to slack run a query on my MS SQL Server and return data?
I did this on my iOS app via sql.client 3rd party addon but can't figure it out on slack. Thank you!
(no problem to use 3rd party api or add-ons)
Not with vanilla Slack but if you integrate a "bot" alongside the SqlServerSlackAPI custom integration you can add custom functionality like you are after.
Bot's like Hubot or mmbot will provide the mechanism to write scripts that respond to certain commands or phrases.
I'm currently using mmbot and the SqlServerSlackAPI addon to write custom alerts and commands for monitoring some internal systems with the ability to send commands to Slack to get updates on the status of certain services. Slack fires off a command to a script running in mmbot which triggers a sql procedure to run a query and return results back to Slack which displays this as a message.
If you want something out of the box, check out https://beta.tunnel.ai, it's a slackbot for running SQL queries in slack. It works with any SQL database, including MS SQL. After you add to slack and integrate your database, you'll be able to type SQL in a direct message to the bot, and get data back in Slack. You can save, label, an schedule queries, and export to csv also.
The bot is a hosted solution with two 3rd parties (Tunnel.ai and Slack), and you will need to provide credentials to your database when integrating for the first time (done via conversation with the bot). This might not be for you if you're wary of third party access to your database, but it sounds like you aren't.
Related
I've created an application and I'd like to test how well it scales to large numbers of users.
To run my application a user has to go to the homepage, sign in to a Google account, click a button and then upload a video file.
First of all, is this possible to emulate using JMeter? I'm signed into my Google account locally but am not sure whether simulated users will have access to it?
Secondly, I've recorded a session in JMeter doing the actions above and have run the test with 10 simulated users, however, the App Engine dashboard doesn't detect any activity. I've followed the steps mentioned here but obviously with details of my application etc.
Here's a screenshot of the summary report.
Is there anything obvious I might be doing wrong? Am I using JMeter in the correct way to test the application as desired?
Apologies for my JMeter inexperience.
This is not something you will be able to record and replay, my expectation is that your application is protected by OAuth so you will need some token in order to execute your calls.
Not knowing the details of your application implementation it's quite hard to guess what's went wrong, I would recommend
Running your test with 1 user and 1 loop first to ensure that it's doing what it is supposed to be doing by adding View Results Tree listener and inspecting request and response details for each sampler (especially for failed ones).
Once you figure out what's wrong with this particular request - amend JMeter configuration so it would be successful. Repeat until you're happy with the test end-to-end.
Add load only after that and be careful as test might be sensitive to extra users/loops, especially if you're using a single login account (which is not recommended)
References:
How to Handle Correlation in JMeter
How to Run Performance Tests on OAuth Secured Apps with JMeter
I want to check latencies of RPC every day about CakePHP Application each endpoints running in GKE cluster. I found it is possible using php google client or zipkin server by reading documents , but I don't know how easy to introduce to our app though both seem tough for me.
In addition, I'm concerned about GKE cluster configuration has StackDriver Trace option though our cluster it sets disabled.Can we trace span if it sets enable?
Could you give some advices?
I succeeded to send gcp's trace api in php client via REST. It can see trace set by php client parameters , but my endpoint for trace api has stopped though I don't know why.Maybe ,it is not still supported well because the document have many ambiguous expression so, I realized watching server response by BigQuery with fluentd and DataStudio and it seem best solution because auto span can be set by table name with yyyymmdd and we can watch arbitrary metrics with custom query or calculation field.
I am developing an application and decided Nagios3 for performing monitoring stuff. But I am stuck at two points. I am using check_http plug-in for monitoring load on my service api. Now I want to perform below tasks.
I need to set a threshold in check_http for performing some task after crossing that threshold. I tried below command
'check_command check_nrpe_1arg!check_service_api'
but it only tells me the load, not any threshold is set. while below one doesn't work.
'check_command check_service_api!100!200'
I need to send simple text message on some port(my application).
I am new to Nagios, so please help me figuring out the solution except email notification stuff.
There is a check command that you can download called "notify_sms" that integrates with an API server hosted by a company called Esendex. They charge for their service but it works well.
In my SQL Server agent, I did not set any notifications, then why this error is coming?
I run pakg through dtsexec it executes successfully, and also I run a simple job for inserting record it runs successfully, but when in job step I select file system and give package path and run job it gives me that error:
The Messenger service has not been started - NetSend notifications
will not be sent
I check in services.msc but there is no service like window messenger, I also check in gpedit, there is a window messenger, I apply its all three options enable,disabled, not configure one by one but did not get rid to that error.
any help will be appreciated, Thanks in advance.
This is an informational message that appears and can be safely ignored if you are not using net send alerts.
If you wish to send net send alerts then you have to set the Messenger service to at least Manual startup, preferably Automatic. Then you have to start the service.
It does a check to see if the Messenger service is running, if it isn't then it produces this message as information to say "I cannot send net sends" but it doesn't necessarily mean there is a problem if you are not using net send alerting.
Windows server 2008 have no messenger service at all. msdn forum topic with additional info about your problem. Just ignore it.
I want to export some tables in my DB to an Excel/Spreadsheet every month.
In PHPMyAdmin there is a direct option of exporting the result of a query to the desired filetype. How do I make use of this export feature without another script to run a cronjob on a monthly basis?
Basically on a CPanel (the DB is hosted in the web) we just have to give the path to the script to be executed via a cronjob. But in PHPMyAdmin there is no such opportunity. Its an included feature of PHPMyAdmin where we generally click and do it mannually. So how do i do it in Cpanel?
Do you have ssh access to the box? Personally I'd implement this outside of phpmyadmin, as phpmyadmin is just intended for manual operations via the interface. Why not write a simple script to export the db?
Something like mysqldump database table.
Being a web-app, the export function is a POST request. In the demo application the URL is http://demo.phpmyadmin.net/STABLE/export.php, and then the post data contains all the required parameters, for example: (You can use Fiddler/Chrome dev tools too view it)
token:3162d3b849cf652c2577a45f90022df7
export_type:server
export_method:quick
quick_or_custom:custom
output_format:sendit
filename_template:#SERVER#
remember_template:on
charset_of_file:utf-8
compression:none
what:excel
codegen_structure_or_data:data
codegen_format:0
csv_separator:,
csv_enclosed:"
.....
The one tricky bit is the authentication token, but I believe this is also possible to overcome using some configuration and/or extract parameters (like the 'direct login' in http://demo.phpmyadmin.net/)
See here
How to send data using curl from Linux command line?
If you want to avoid all this, there are many other web-automation tools that can record the scenario and play it back.
just write a simple php script to connect to your database and use the answer here:How to output MySQL query results in CSV format?