Trying to config my first script
My goal is to automate an alert if my heater is in Error… there are many type error … The only state that is good is E-00: OK’
i would like to trigger the script only if the value is <> to state: "E-00: OK’
Is there a way to do that?
Script Yaml
alias: >-
Heater E10
sequence:
condition: state
entity_id: sensor.heater_error_string
state: "E-00: OK’
mode: single
icon: mdi:radiator
Yes, you can create server-side automation script which is triggered only when your text sensor entity value changes from OK to any other.
For example, you may try:
automation:
trigger:
- platform: state
entity_id: sensor.heater_error_string
from:
- "E-00: OK"
action:
- service: notify.mobile_phone_app
data:
message: heater is not ok
title: Heater Notification
mode: single
Related
There is any way to test a seed with a relatioship coming from a external source?
I'm trying to test the seeds before creating them, to do this I'm creating in this moment a relationship test but with an external source.
I would like to do something like this in the seeds/schema.yml:
version: 2
seeds:
- name: products_market
description: ""
columns:
- name: id_source
description: "ID source"
- name: id_target
description: "id target"
tests:
- relationship:
to: source('dt', 'products')
field: id_product
In this case the field id_target would be checked if exists the field id_product from dt.products
But I get the error
'test_relationship' is undefined. This can happen when calling a macro that does not exist. Check for typos and/or install package dependencies with "dbt deps".
The sources.yml
version: 2
sources:
- name: dt
tables:
- name: products
description: General Products
I saw this info but not sure if I'm doing it well or maybe there is another way to do this
https://docs.getdbt.com/reference/seed-properties
https://docs.getdbt.com/reference/resource-properties/tests
EDIT:
I was missing an 's' in the test relationships statement in the schema.yml. Anyway it doesn't look i'm doing it properly, it says there is no test or do nothing when I do dbt seed... or dbt build
version: 2
seeds:
- name: products_market
description: ""
columns:
- name: id_source
description: "ID source"
- name: id_target
description: "id target"
tests:
- relationship**s**:
to: source('dt', 'products')
field: id_product
Thanks in advance
Given a single (.jmx) file - what is the equivalent to the following configuration in the image seen below.
Taurus (.yml) Configuration
included-configs:
- Variables-local.yml # the file containing your properties definitions
execution:
iterations: 1
concurrency: 1
scenario:
script: AutomatedTests.jmx
modules:
jmeter:
class: bzt.modules.jmeter.JMeterExecutor
path: C:/JMeter
properties:
jmeter.save.saveservice.autoflush: 'true'
reporting:
- module: junit-xml
filename: TEST-Taurus.xml
Image Reference to JMeter UI Functionality
Amend you "execution" block and add all the modifications you want to make to the original JMeter script there like:
included-configs:
- Variables-local.yml # the file containing your properties definitions
execution:
iterations: 1
concurrency: 1
scenario:
script: AutomatedTests.jmx
modifications:
set-prop:
"Test Plan>TestPlan.serialize_threadgroups": true
modules:
jmeter:
class: bzt.modules.jmeter.JMeterExecutor
path: C:/JMeter
properties:
jmeter.save.saveservice.autoflush: 'true'
reporting:
- module: junit-xml
filename: TEST-Taurus.xml
More information:
Modifications for Existing Scripts
Navigating your First Steps Using Taurus
I want to send notification in case any of the build step fails in drone ci. I tried adding following trigger at various levels, but it always runs, even in case of success.
Trigger that I am trying is as follows:
trigger:
status:
- failure
Tried setting it up inside/outside the steps. but it keeps getting triggered every time.
Try using where instead of trigger, like this:
- name: notify-me
image: ...
...
when:
status: [ failure ]
I have Warning message in my IIS 6 Viewer.How to solve this problem?
Event Type: Warning
Event Source: ASP.NET 2.0.50727.0
Event Category: Web Event
Event ID: 1309
Date: 11/3/2009
Time: 8:18:20 AM
User: N/A
Computer: PEB-BL05
Description:
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 11/3/2009 8:18:20 AM
Event time (UTC): 11/3/2009 1:18:20 AM
Event ID: 6d12e7ec9a314fd59153efb83329b5c3
Event sequence: 236
Event occurrence: 1
Event detail code: 0
Application information:
Application domain: /LM/W3SVC/1950175433/Root/myApp
Trust level: Full
Application Virtual Path: /attga
Application Path: C:\Inetpub\wwwroot\myApp\
Machine name: MyComMachine
Process information:
Process ID: 4528
Process name: w3wp.exe
Account name: NT AUTHORITY\NETWORK SERVICE
Exception information:
Exception type: RowNotInTableException
Exception message: This row has been removed from a table and does not have any data. BeginEdit() will allow creation of new data in this row.
Yes, more info is really needed. On the surface it looks like you have a page that is manipulating a table and it encountered an error that was not handled, so IIS reset the worker process (handled your exception for you). Hwo do you troubleshoot? There are a number of ways, but the one I am most familiar with and use most frequently is to attach the debugger (cdb or windbg), set a BP on the exception that is occuring and then wait. You can then use the debugger to determine the page that is failing and anything more you want. To learn more about this process I'd recommend a book by John Robbins:
http://www.amazon.com/Debugging-Applications-Microsoft%C2%AE-Microsoft-Pro-Developer/dp/0735615365
This is an application error caused by what ever is running in the "myApp" folder.
Take a look at whats in there and then come back.
Sql server 2005 service pack 2 version: 9.00.3042.00
All maintenance plans fail with the same error.
The details of the error are:-
Execute Maintenance Plan
Execute maintenance plan. test7 (Error)
Messages
Execution failed. See the maintenance plan and SQL Server Agent job history logs for details.
The advanced information section shows the following;
Job 'test7.Subplan_1' failed. (SqlManagerUI)
Program Location:
at Microsoft.SqlServer.Management.SqlManagerUI.MaintenancePlanMenu_Run.PerformActions()
At this point the following appear in the windows event log:
Event Type: Error
Event Source: SQLISPackage
Event Category: None
Event ID: 12291
Date: 28/05/2009
Time: 16:09:08
User: 'DOMAINNAME\username'
Computer: SQLSERVER4
Description:
Package "test7" failed.
and also this:
Event Type: Warning
Event Source: SQLSERVERAGENT
Event Category: Job Engine
Event ID: 208
Date: 28/05/2009
Time: 16:09:10
User: N/A
Computer: SQLSERVER4
Description:
SQL Server Scheduled Job 'test7.Subplan_1' (0x96AE7493BFF39F4FBBAE034AB6DA1C1F) - Status: Failed - Invoked on: 2009-05-28 16:09:02 - Message: The job failed. The Job was invoked by User 'DOMAINNAME\username'. The last step to run was step 1 (Subplan_1).
There are no entries in the SQl Agent log at all.
Probably no points for this, but you're likely to get more help on this over at ServerFault.com now that they are open.