Email Notification – Host Name and Deployment Status

BatchPatch Forums Home Forums BatchPatch Support Forum Email Notification – Host Name and Deployment Status

Tagged: 

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #12644
    areynolds1
    Participant

    Hola

    First, I am new to BatchPatch so please forgive me and my for lack of a better word, ignorance.

    I want to configure an email that can do one of the following:
    1. Send an email with only specified columns reporting after a deployment. I have followed the instructions found on the How To Send Email Notifications In BatchPatch
    https://batchpatch.com/how-to-send-email-notifications-in-batchpatch, to set up a dummy host so can send emails out manually, but I am getting way to much information from the grid. I prefer to keep the information in the grid view, but don’t necessarily want all of it in an email.

    Is this possible? Just to send out certain fields\columns\headers as opposed to the whole grid?

    Thank you for your time and understanding!

    Aaron

    #12645
    doug
    Moderator

    Hi Aaron – It is not currently possible to change the columns that are sent via email. The email will include any/all visible columns in the grid. However, we are considering possibilities for customization in a future version.

    Thanks,
    Doug

    #12646
    areynolds1
    Participant

    Doug,

    Thanks for the fast reply! How about this then is there a way to show in a column if a condition is met? Say i want to see if an application ( file ) is installed. I provide the path to the file to see if it is there, and then change the row color. If it finds that that file is not there then it emails out per host. I am sure there is a better way, say run a job that pulls all installed applications, and then filter all of that out that way.

    Thanks

    Aaron

    #12647
    doug
    Moderator

    You can use the job queue… there is a special item “If specified file exists, goto label:X” as well as “If specified file does not exist, goto label:X”. Then specify a label to goto and use the “Set row color” special item and/or “send email notification.”

    #12648
    areynolds1
    Participant

    Hola

    So I have run it 2 ways:
    1. like you suggested looking to see if the file exists, and if so\not then goto a label:
    Start pinging
    Set row color:-32513
    If host is offline, goto label:End
    If specified file (C:\Program Files (x86)\Google\Chrome\Application\chrome.exe) exists,
    goto label:File Found
    If specified file (C:\Program Files (x86)\Google\Chrome\Application\chrome.exe) does not
    exist, goto label:File Not Found
    Label:File Found
    Set row color:-8323200
    Goto label:End
    Label:File Not Found
    Set row color:-65536
    Send email notification

    Goto label:End
    Label:End
    Stop pinging
    Then I just get the host names based on the email that comes in.

    I also have set up an email after all of the jobs have been run via the article
    Automatically Trigger an Email Notification for an Entire Grid Only After All Targets’ Actions Have Completed https://batchpatch.com/automatically-trigger-an-email-notification-for-an-entire-grid-only-after-all-targets-actions-have-completed
    The issue there is that the grid that I get mailed does not contain any sort of colored rows to indicate where the file was found or not found.

    Thanks
    Aaron

    #12649
    doug
    Moderator

    The HTML email report does not have the row colors that the grid has. That said, if your queue is only sending the email when the file is not found, then what purpose does the color even serve? If you receive the email, then you know that the file was not found for that row, right? It sounds like maybe you are using $grid for your email notification, but perhaps you should be using $row instead… this would then instruct the email to send the contents of just the row that sent the email, not the entire grid’s rows.

    And so yes, if you use the “Automatically Trigger an Email Notification for an Entire Grid Only After All Targets’ Actions Have Completed” you will not see the row colors. Those colors exist only in the grid and not in the HTML report, as mentioned above. I’m not sure if we would modify this behavior, but we’ll consider it.

    All that said… I don’t really understand why this is being setup for email. I mean… if you want to see if a bunch of computers have a particular file on them… why not just run a single BP task (at any time you want, when you are sitting in front of your BP installation) where you select all rows and then execute ‘Actions > Get info > Check if file exists’ at which point you will instantly know for any number of computers whether or not they have the file or not.

    #12650
    areynolds1
    Participant

    The colors in the main application serve the purpose to easily identify if the specific file was found or not. I am not aware if BP gives any other indication of the result from the search unless I go through the All Messages column, per host, to look for an entry displaying the result of the query of if the file exists or not, unless I have overlooked something and if so I am sorry. If i have a number of machines outside of a handful, then I would prefer to kick it off and walk away, and have it send me the results when the task is finished summarizing the overall task. The machine by machine check\email was just another work around to get a result. So it is going to be each Host that fails the check, or the entire grid. Again color of rows for visual indication, and emailing the HTML export of the entire grid is for recordkeeping\reference if you will, but there is still no easy way to parse that data set as a whole. The email at the end of the task has to be $grid, if it is set to $row then it just sends the row that tells it to email, right?.

    Referencing the All that said piece…
    At times data collection is required for upward reporting. I know I am not stating anything new, and believe that it is better to have data in hand to an answer questions, rather than “…I think it was…”. Also running the task from BP, and seeing the results in color aligned results is good, having to go through the lists of host and count each host not found to satisfy the query can add time to the task, especially say if the task is run against a hundred hosts. With no way to sort the grid based on result or color, scrolling and counting does not seem like the best practice – again if this is not the case I apologize.

    So a better option it sounds like , for this issue, is just to run a PS script and Export-Csv perhaps.

    Bottom line – I am quite fond of BP and all of the things it can do, I am just looking for in this case, a way to get the results out in an easily manipulated format, either by color of HTML, sorting within the main application, an internal indication if the query was met or not. The current state of the application does not seem to report the results in this way. Hopefully in a future release.

    Thank you for your time.

    #12653
    doug
    Moderator

    If you use the real-time operation (not scheduled, not job queue, not email notification): ‘Actions > Get info > Check if file exists’, the result will be reported in blue text if the file exists, red text if does not exist. So, in this way it’s easy to select an entire grid of hosts and run the check in a single operation against all hosts, and then you have your result immediately visible with red and blue coloring of the text in the ‘All Messages’ column. This will take just several seconds to execute across a large number of hosts, so there is no need to kick it off and walk away. However, you would not be able to sort the rows/results based on the colored text though. It will only sort alphabetically. As a workaround to this you could select/highlight each desired row and move them into a different grid (Actions > move). This would enable you to get all of the hosts that found the file (or that didn’t find the file) into their own grid, which might be helpful to you. Not sure. You could also manually move the rows up and down in the grid to group them. This would be somewhat annoying in a large grid, but I’m just mentioning it so that you’re aware that it’s an option, in case it helps. To move a row or a group of rows up or down, highlight/select them in the grid and then use ‘ctrl-shift-plus’ or ‘ctrl-shift-minus’.

    I understand, in general, why someone might want to schedule tasks vs run things in real-time. Obviously we have the scheduler for that purpose. However, it isn’t/wasn’t immediately clear to me why you would want to specifically check for the existence of a file, triggered by a scheduled task. What I mean is that it’s very clear when someone wants to run, for example, a Windows update installation in the middle of the night via scheduled task. This is because you might have a certain time window where a machine can be updated/rebooted, and you want to be asleep during that process because it’s at 2AM or something like that, and then you would like to wake up and just check your email to make sure everything went ok with no major alarms. However, in the case of checking for a file’s existence (or application’s existence) normally that’s the type of task that a sysadmin would be doing in real-time during the workday, while sitting in front of the computer, not scheduled in the middle of the night. So, it helps for us to understand the ways that our customers are using the app, especially when they are not expected or typical ways. This is why I was trying to learn from you more about what you’re doing and why you’re doing it… so that we could then assess if it might make sense to update the app to accommodate some unexpected type of usage. Also because frquently we have someone who is doing something one way simply because they don’t realize that there is another better or different way. And in those cases it helps us to know what the actual end goal is, as opposed to what the specific action is that someone is running. That is to say, sometimes a user will be focused on “I’m trying to do X”. And I’ll want to understand WHY he/she is trying to do X so that I can suggest a Y alternative that might be better (if there is such an alternative available), rather than focusing on getting X to function in a way that it was not really designed to do… like trying to put a square peg in a round hole when we actually have a round peg available in the app that the user was not aware of.

    If you use the job queue operation to check if a file exists, then you’re correct that it would be more difficult to parse the results of the ‘All Messages’ column in that case. So, using the job queue branching to set the row colors makes sense in this case in order to make the results easier to see. However, if your sole purpose of the job queue is to check if the file exists (and not actually be executing some other action based on whether or not the file exists), then using the job queue doens’t really make sense here, and instead it makes more sense to just use the ‘Actions > Get info > Check if file exists’ option, I think, unless I’m misunderstanding your needs. That said, this ‘check if file exist’ option is not schedulable on its own. So if it must be executed as a scheduled task, then it would have to be executed inside of the job queue, so in that case you would be back to coloring the rows with goto labels like you were doing. But of course then if you email the grid, you won’t see those row colors. The row colors will only be visible in the BatchPatch grid, not the HTML export/report/email. In the current release of BP you cannot sort by row color, but in the next version that should be coming out pretty soon, you will be able to sort by row color. Coincidentally this is something we added last month to the code… it just has not yet been published.

    Yes, $grid sends the entire grid, and $row sends just the row. So yes, if you are trying to just send a single email for the entire grid, then you would use $grid. But in the case where you are having each individual row’s job queue send an email, in that case probably you want to set each row’s email notification to $row.

    Lastly, with regard to “data collection” through email notifications… Note also that you can save each grid to its own .bps file, which I think would be much better for retaining data than sorting through old HTML email notifications. Also, the .bps file will, of course, retain all of the row colors, unlike the HTML email notifications. We’ll consider adding row colors to the email notifications in a future build.

    I hope this helps.

    #14035
    Dave
    Participant

    Hi, Just wondering if there was any progress on this?

    *****Hi Aaron – It is not currently possible to change the columns that are sent via email. The email will include any/all visible columns in the grid. However, we are considering possibilities for customization in a future version.

    Thanks,
    Doug*****

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.