add disclamier note in all splunk report at one shot - splunk

we want to add one disclaimer notes as below on 50 reports of splunk.. can we do that in one shot?
Disclaimer:- In case you do not find any attachment OR Blank attachment this means no matching events or Blocked events were found during the report scheduled time.

If you have access to the CLI then you can edit the savedsearches.conf file(s) to add that text. It should be faster than using the GUI.

Related

How do I prevent a process from running twice if 2 different users run it at the same time in VBA?

I have a front-end form that fetches data from a back-end table. The front-end has multiple users and they use the back-end table simultaneously. The user uses a form to generate reports. Let's say if a user click the "view" button, the background process will insert data to a table and it will show the result.
However, my problem is if 2 different users from different locations click the "view" button from their end machine at the same time, the process on the back-end table runs twice and it duplicates the data.
I know we can delete duplicate data from the table itself but what I'm trying to do is if there's a way to stop one process if there's already a same process running.
I have found a scenario similar to my problem but it is only caused by clicking the button twice.
Here's the link for the similar problem.
I hope someone could help me out. It's my firs time to use VBA and I have no previous knowledge/experience with it.
I was not able to prevent a process for running twice but we were able to find a workaround for my concern by assigning a compound index to the table. It no longer accepts duplicates regardless of the process running multiple times simultaneously.

how to download all the report from SSRS report

I am new in this field and I am looking to download a single report, but it has more than 200 values in a drop down. Can you guide me how to download all the report with 200 values in one go.
Let me give you an overview of what the data looks like:
There are 200 practices and each practices has 5 or 6 providers. I am new in healthcare industry. So, I need to manually click on each practice and each provider and click on the view report to see the report and then download the report. So, we have run the report and click to save in PDF for all 1000+ reports.
We use the standard version of SSRs and we don't have any Enterprise version of it.
Can you guide me what to do in this case? Thanks.
I would recommend using a data-driven subscription to generate these reports. When you set up the subscription, you can provide a query that lists all the practices. When the subscription runs, it will generate a separate copy of the report using each practice as a parameter value.
You can set the subscription to email the reports or save them in a folder. This way, it doesn't matter so much how long it takes to run and there is much less manual work for you once you set it up.
You need to amend the report definition so that the filters allow for 'Select Multiple' that way you can select all in the drop downs.
So for example:
The option "Allow Multiple Values" would allow you to Select all of that parameter.
You can also use URL Access and pass in the parameter you want.
Go to http://<server_name>/ReportServer/ and find the report you want.
Then tack on to the end the parameter name and value you want. &param=val&param2=val2
Then add the &rs:Format= command and put your desired extension like CSV.
e.g. http://<server_name>/ReportServer/Pages/ReportViewer.aspx?<my_report_path>&param=val&param2=val2&rs:Format=CSV
https://learn.microsoft.com/en-us/sql/reporting-services/pass-a-report-parameter-within-a-url?view=sql-server-ver15
If you have a lot of parameters, then run this through for loop. Python may be easiest.

How can multiple users run macros on a shared excel file?

I have an excel file on shared location where multiple users (4 in this case) are accessing the file at the same time.
This file has a “Master data” tab where all the base data is there and then there are 4 identical tabs (one for each user).
Each user tab has a set of filters using which the user will be able to extract relevant data based on the filters selected and can add or edit the rows. Once the user is done editing/adding rows, user will submit the data which will get updated/appended in the master data tab.
Users can select same or different options in the filters. I am facing errors when multiple users click on the submit button (macro) at the same time.
How can I resolve this?
Like some comments say, Excel is not designed for this...
But if you want to use Excel, i would recommend something like this:
Every time someone writes in the master data, you have to "lock" the master data tab. Just put a boolean in a cell, set it to true while you are writing and back to false as soon as you finished altering the master data tab.
Now, if someone wants to change values in the master data tab at the same time, check if the boolean is set to true. If yes, then you have to wait, if not, you can write the data.
Adding to Manuel Allenspach's response, my suggestion is to create a queue.
Queue should have a spot for user processing and other spots for users waiting.
Than, before running code, you should include a check to make sure no two users have their macros updating database at same time.

Lotus Notes: Replication conflict caused by agent and user running on the document at same time

In one of the lotus notes db, too frequent replication/save conflicts are caused reason being a scheduled agent and any user working on the document at the same time.
is there any way to avoid this.
Thanks,
H.P.
Several options in addition to merging conflicts:
Change the schedule The best way to avoid it is to have your scheduled agents running at times when users are not likely to be accessing the system. If the LastContact field on a Client document is updated by an agent every hour as it checks all Contact documents, maybe the agent should run overnight instead.
Run the agent on user action It may also be the case that the agent shouldn't be running on a schedule, but should be running when the user takes some action. For example, run the agent to update the Client document when the user saves the supporting Contact document.
Break the form into smaller bits A third thing to consider is redesigning your form so that not every piece of data is on a main form. For example, if comments on recent contacts with a client are currently held in a field on the Client document, you might change the design to have a separate ClientMeeting form from which the comments on the meeting are displayed in an embedded view or computed text (or designed using Xpages).
Despite the fact that I am a developer, I think rep/saves are far more often the result of design decisions than anything else.
You can use the Conflict Handling option on the form(s) in question and select either Merge Conflicts or Merge/No Conflicts in order to have Notes handle merging of edit conflicts.
From the Help database:
At the "Conflict Handling" section of the Form Info tab, choose one of the following options for the form:
Create Conflicts -- Creates conflicts so that a replication conflict appears as a response document to the main document. The main document is selected based on the time and date of the changes and an internal document sequence number.
Merge Conflicts -- If a replication conflict occurs, saves the edits to each field in a single document. However, if two users edit the same field in the same document, Notes saves one document as a main document and the other document as a response document marked as a replication conflict. The main document is selected based on the criteria listed in the bullet above.
Merge/No Conflicts -- If replication occurs, saves the edits to each field in a single document. If two users edit the same field in the same document, Notes selects the field from the main document, based on time and date, and an internal document sequence number. No conflict document is generated, instead conflicting documents are merged into a single document at the field level.
Do Not Create Conflicts -- No merge occurs. IBM® Lotus® Domino(TM) simply chooses one document over another. The other document is lost.
In later versions of Notes there is the concept of document locking, and used properly that can prevent conflicts (but also add complexity).
Usually most conflicts can be avoided by planning to run the agents late at night when users aren't on the system. If that's not an option, then locking may be the best solution. If the conflicts aren't too many, you might benefit from adding a view filtered to show only conflicts, which would make findind and resolving them easier.
IMHO, the best answer to conflicts between users and agents is to make sure that they are operating on different documents. I.e., there are two documents with a common key. They can be parent and child if it would be convenient to show them that way in a view, but they don't have to be. Just call them DocA and DocB for the purposes of this discussion.
DocA is read and updated by users. When a user is viewing DocA, computed field formulas can pull information from DocB via DbLookup or GetDocField. Users never update DocB.
DocB, on the other hand, is read and updated by agents, but agents only read DocA. They never update them.
If you design your application any other way, then you either have to use locking -- which can create the possibility of not being able to update something when you need to, or accepting the fact that conflicts can happen occasionally and will need to be resolved.
Note that even with this strategy, you can still have conflicts if you have multiple replicas of the database. You can use the 'Conflict Handling' section of the Form properties to help minimize replication conflicts, as per #Per Henrik Lausten's answer, but since you are talking about an existing please also see my comment to his answer for additional info about what you would have to do in order to use this feature.
If this is a mission critical application, consider creating a database with lock-documents. That means, every time a user opens a document, a separate lock-document is created.
Then code the agent to see if lock-documents exist for every document that the agent wants to modify. If it does, skip that document.
Document-close should remove the doc-lock.
The lock-doc should be created on document open, not just read. This way, when a user has the document open in read mode, the agent will not be able to modify as well. This is to prohibit, that the user might change to editmode afterwards and make changes.
If the agent has a long modification time, it should create lock-docs as well.

How to find the document visitior's count?

Actually I am in need of counting the visitors count for a particular document.
I can do it by adding a field, and increasing its value.
But the problem is following.,
I have 10 replication copies in different location. It is being replicated by scheduled manner. So replication conflict is happening because of document count is editing the same document in different location.
I would use an external solution for this. Just search for "visitor count" in your favorite search engine and choose a third party tool. You can then display the count on the page if that is important.
If you need to store the value in the database for some reason, perhaps you could store it as a new doc type that gets added each time (and cleaned up later) to avoid the replication issues.
Otherwise if storing it isn't required consider Google Analytics too.
Also I faced this problem. I can not say that it has a easy solution. Document locking is the only solution that i had found. But the visitor's count is not possible.
It is possible, but not by updating the document. Instead have an AJAX call to an agent or form with parameters on the URL identifying the document being read. This call writes a document into a tracking DB with one or two views and then determines from those views how many reads you have had. The number of reads is the return value of the AJAX form.
This can be written in LS, Java or #Formulas. I would try to do it 100% in #Formulas to make it as efficient as possible.
You can also add logic to exclude reads from the same user or same source IP address.
The tracking database then replicates using the same schedule as the other database.
Daily or Hourly agents can run to create summary documents and delete the detail documents so that you do not exceed the limits for #DBLookup.
If you do not need very nearly real time counts (and that is the best you can get with replicated system like this) you could use the web logs that domino generates by finding the reads in the logs and building the counts in a document per server.
/Newbs
Back in the 90s, we had a client that needed to know that each person had read a document without them clicking to sign or anything.
The initial solution was to add each name to a text field on a separate tracking document. This ran into problems when it got over 32k real fast. Then, one of my colleagues realized you could just have it create a document for each user to record that they'd read it.
Heck, you could have one database used to track all reads for all users of all documents, since one user can only open one document at a time -- each time they open a new document, either add that value to a field or create a field named after the document they've read on their own "reader tracker" document.
Or you could make that a mail-in database, so no worries about replication. Each time they open a document for which you want to track reads, it create a tiny document that has only their name and what document they read which gets mailed into the "read counter database". If you don't care who read it, you have an agent that runs on a schedule that updates the count and deletes the mailed-in documents.
There really are a lot of ways to skin this cat.