diff --git a/telegraf/files/script/reclass_monitor.py b/telegraf/files/script/reclass_monitor.py
index c209ae9..f514e63 100644
--- a/telegraf/files/script/reclass_monitor.py
+++ b/telegraf/files/script/reclass_monitor.py
@@ -10,8 +10,8 @@
 def parse_args():
     parser = argparse.ArgumentParser()
     parser.add_argument("--git-dir", default="/srv/salt/reclass")
-    parser.add_argument("--remote", default="origin")
-    parser.add_argument("--branch", default="master")
+    parser.add_argument("--remote", default="")
+    parser.add_argument("--branch")
     return parser.parse_args()
 
 CHANGES_FORMAT = '''reclass_staged_changes,directory={dir} value={staged}
@@ -34,14 +34,44 @@
         dir=git_dir, staged=len(staged), unstaged=len(unstaged)
     ))
 
-    if args.remote.strip() in call_process(
-        str.split('git remote show'), cwd=git_dir
-    ).splitlines():
-        # 0 if local branch is synced with remote, 1 otherwise
-        print('reclass_remote_desync,directory={dir} value={val}'.format(
-            dir=git_dir, val=int(bool(call_process(
-                str.split("git diff {branch}..{remote}/{branch}".format(
-                    branch=args.branch.strip(), remote=args.remote.strip()
-                )), cwd=git_dir
-            )))
-        ))
+    # if no branch provided, default to current local branch
+    if not args.branch:
+        args.branch = call_process(str.split(
+            'git rev-parse --abbrev-ref HEAD'
+        ), cwd=git_dir).strip().lstrip('heads/')  # branch and tag share name
+        if args.branch == 'HEAD':  # detached head, any assumption is bad
+            args.branch = 'master'
+    local_branch = args.branch.strip()
+
+    # remote handling
+    remotes = call_process(str.split('git remote show'), cwd=git_dir).splitlines()
+    remote_ref = '{}/{}'.format(args.remote.strip() or 'origin', local_branch)
+
+    # if no remote provided, try figuring out upstream tracking branch
+    if not args.remote:
+        upstream_ref = call_process(str.split(
+            'git for-each-ref --format=%(upstream:short) refs/heads/{}'.format(local_branch)
+        ), cwd=git_dir).strip()
+        if upstream_ref and upstream_ref.split('/')[0] in remotes:
+            args.remote = upstream_ref.split('/')[0]  # breaks on remotes with slashes
+            remote_ref = upstream_ref
+        else:
+            args.remote = 'origin'
+
+    if args.remote.strip() in remotes:
+        known_refs = call_process(str.split(
+            'git for-each-ref --format=%(refname:short)'
+        ), cwd=git_dir).splitlines()
+
+        if all([  # check whether we have the local and remote branch with the same name
+            local_branch in known_refs,
+            remote_ref in known_refs
+        ]):
+            # 0 if local branch is synced with remote, 1 otherwise
+            print('reclass_remote_desync,directory={dir} value={val}'.format(
+                dir=git_dir, val=int(bool(call_process(
+                    str.split("git diff {local_ref}..{remote_ref}".format(
+                        local_ref=local_branch, remote_ref=remote_ref
+                    )), cwd=git_dir
+                )))
+            ))
