Announcing TimeTrack – Time tracking & invoicing for Contractors

B2B Consultancy introduces TimeTrack.au – A tool for all freelance and contracting professionals to track their time, and send invoices.

TimeTrack.au

Get To Know TimeTrack

The TapTime software was written in 2014 to address my need to deliver accurate time reports to my clients.

Over the years I have continued to adjust and tweak the software so that it is easy to track time and send invoices. Now in 2023, there are over 6,000 timesheet entries and over 250 invoices I have created as a freelance software developer.

  • My clients love it because they can always see what I am working on.
  • Are you a freelance developer that charges per hour?
  • Do you want to keep accurate time tracking?
  • Do you want to send invoices to your clients?
  • Do you want to track your work with graphs and calendars?
  • Do you want a free solution for tracking time?
  • Only Pay when you get money from your clients?
  • TimeTrack is for you!!

Mention that you have read this article and I will give you an additional 5 invoices to try out TimeTrack

Project Delivered PSCB

Small win for B2B in Cambodia. We delivered on a small project to create a web site for our customer. The customer needed a promotion for his Pro Soccer Bets Club to go along with his tipping business over Telegram.

B2B Looked at his needs and was able to generate a site that the customer can manage. The customer was very happy as we delivered within his small budget and 2 weeks ahead of schedule. We registered the domain name, secured the hosting based on the highest density of customers and purchased a nice template

B2B will go into a maintenance role with the web site now, and ensure that SEO is maintained, and the backups are done.

Have a look! https://www.prosoccerbets.com

Easiest Nagios Extensions


Image by Gerd Altmann from Pixabay

There have been 2 scripts that have allowed me to extend Nagios more easily than almost any other monitoring configuration over the last 10 years. This has allowed me to create monitors within the applications that I have built and within existing applications. A few time it has helped me to solve complex monitoring systems where providers have provided ineffective documentation.

This article assumes that you have an understanding of Nagios.

Quite Simply Easy Monitoring

  • check_http_status.sh – allows me to write code within any URL that will return predefined strings  (STATE_OK,STATE_WARNING,STATE_CRITICAL) and a message that will help to determine the error.
  • check_http_content.sh – allows me to search a web page for a string. If that string does not exist then return an error.

Simple right? Does it exist? Maybe. Have I recreated something? Well maybe again. But have been using it for the last 10 years and it has stood the test of time. It is simple, easy to call, and uses existing infrastructure. Web programmers can make as many hooks as needed for the 

One time I was working for a telco, and the IDSN’s connections had a tendency to drop out at the most inconvenient times. We were always on the back foot and reactivating to the problem when our customers reported it to us. How to fix? This was old equipment and there was little documentation for the SNMP traps. BUT there was a web page that would have a red light icon when the ISDN lines would have a problem. The check_http_content.sh allowed me to search for the green icon (The monitor is listed below). Within half an hour I had solved all of our ISDN monitoring issues without having to sift through endless google searches trying to find the correct SNMP trap.

The other script that has been incredibly useful (check_http_status.sh) allows me to write hooks in all of the web apps. This means that all of the complex monitoring can be part of the web application itself (DevOps?)

Pros and Cons

The downside of this is that the monitoring server adds additional load on your web server. This can be controlled by the interval configuration in Nagios. It is a small price to pay to have such an easy to monitor in your systems. Anything can be monitored from processes, database sizes, event frequency, cash flow, service tickets. Anything that you can write a program for can not be monitored in Nagios. 

You have to consider the Security when you run write these scripts. It is not a problem for me as I was on a private network. You can control the access via whitelisting your monitoring server’s IP, or you can add some authentication to your scripts when you call curl.

If you need some assistance implementing this to your DevOps team, please contact us. 

nagiosCheckDatabase.php – Example web hook for checking that database exists. In this case an Oracle database

<?php
//nagiosCheckDatabase.php
require_once ( dirname ( __FILE__ ) . '/config.php' );

$dbName = Request::get ( 'HOST' );

$tab = new DBTable ( $dbName, 'SELECT SYSDATE FROM DUAL', null, DB::FETCH_NUM );

if ( ! $tab->ok() ) {
    echo "Unable to query Database STATE_CRITICAL";
}
else {
    echo "SYSDATE=" . $tab->getValue() . " - STATE_OK";
}

myservers.cfg – Example Service Configuration for Nagios for check_http_status and check_http_content

define service {
  use                   generic-service
  host_name             sydney-mpcsyd
  service_description   Job Results
  check_command         check_http_status!http://192.168.3.200:8080/LiveStats/nagiosCheckJobResults.php?HOST=mpcsyd
  normal_check_interval 60
  retry_check_interval  15
  max_check_attempts    3
}
define service{
  use                   generic-service
  host_name             sydney-rev-au-pocmp3
  service_description   ISDN OCMP3
  check_command         check_http_content!http://192.168.3.130:4242/this.BMPFFaultMgr?GetMapAction=HTML&LEVEL=TOP_LEVEL&TYPE=1&NAME=Root&DATE=0&LEV_NUM=0&LEV_NAME0=N0&LEV_NAME1=N1&LEV_NAME2=N2&LEV_NAME3=N3&LEV_TYPE0=T0&LEV_TYPE1=T1&LEV_TYPE2=T2&LEV_TYPE3=T3!greenISDNIcon.gif
}

commands.cfg – This is the Nagios configuration that connects the services to the scripts

define command {
  command_name check_http_status
  command_line /etc/nagios/scripts/check_http_status.sh '$ARG1$'
}
define command {
  command_name check_http_content
  command_line /etc/nagios/scripts/check_http_content.sh '$ARG1$' '$ARG2$'
}

check_http_status.sh

#! /bin/bash

STATE_OK=0
STATE_WARNING=1
STATE_CRITICAL=2
STATE_UNKNOWN=3
STATE_DEPENDENT=4

if test -x /usr/bin/printf; then
	ECHO=/usr/bin/printf
else
	ECHO=echo
fi

URL=$1

RESP=`curl -s --connect-timeout 300 --retry 3 --silent -f $URL`
RES=$?

if [ "$RES" != "0" ]
then
    echo "Unable to connect to $URL ($RES)"
    exit $STATE_WARNING
else
    echo "$URL: $RESP"
    if echo $RESP | grep -q STATE_OK
    then
        exit $STATE_OK
    elif echo $RESP | grep -q STATE_WARNING
    then
        exit $STATE_WARNING
    elif echo $RESP | grep -q STATE_CRITICAL
    then
        exit $STATE_CRITICAL
    else
        exit $STATE_WARNING
    fi
fi

check_http_content.sh

#! /bin/bash

STATE_OK=0
STATE_WARNING=1
STATE_CRITICAL=2
STATE_UNKNOWN=3
STATE_DEPENDENT=4

if test -x /usr/bin/printf; then
	ECHO=/usr/bin/printf
else
	ECHO=echo
fi

URL=$1
PROCESS=$2

RESP=`curl --silent -f $URL`
RES=$?

if [ "$RES" != "0" ]
then
    echo "Unable to connect to $URL ($RES)"
    exit $STATE_WARNING
else
    if echo $RESP | grep -q "$PROCESS"
    then
        echo "String ($PROCESS) exists in URL: $URL"
        exit $STATE_OK
    else
        echo "Could not find: String ($PROCESS) in URL: $URL"
        exit $STATE_CRITICAL
    fi
fi

What are the Basics?

Image by Gino Crescoli from pixabay.com

What are the Basics for a Software Company? Most simply 4 x M’s, 3 x $’s, 5 x W’s and 1 x A. Confused yet?

When the B2B Consultancy company is invited to help an organization, we always start with the basics. We ask questions surrounding the 4 x M’s. At the highest level, we look at the 4 areas of management before we dive deeper and try to address any problems. We look at 1. People Management, 2. Project Management, 3. Change Management, and 4. Version Management. Now you could say that we have 2 x M’s and 2 x C’s because you think of change control and version control. But the word “control” is a bit too aggressive when you talk about software development in a company. So I take a little bit of poetic license and say that the basics of any software company start with the 4 x M’s. There is also the added element of security that permeates every level of a company. But I will deal with that in another article

  1. People Management – I believe that people are the greatest asset of a software company as they work to transform ideas into software and software generates money. We must ensure that our people are well looked after and know what they are doing. People need to know their place in the company, and that they are making a difference and they are being rewarded for their efforts. We also look at typical HR to ensure that people are selected correctly. Then we look at the pragmatic elements of people management. Meeting structure, one-on-ones, seating layouts, tools, company perks. All the elements that make the people want to be at the company and the employees are productive.
  2. Project Management – A project is a chunk of work that the company decides needs to be put in place to make the company better. This can be anything from a new building or a new website or new software or advertising campaign, or anything. A project is at a high level something that people with do in the company to make it better. As most companies are resource-limited, not all projects can be done at once. When deciding what projects must be completed, there are some very basic considerations. I call these the 3 x D’s or 3 x $’s – 1. Does it make money? 2. Does it save money? 3. Does it improve the goodwill of the company (hard to put a dollar amount on)? At the most basic level, you can rate every project into these 3 categories you have an objective way to determine the priorities of the company. Obviously, it is not this easy, and you have to be careful of investing too much time in determining the value of the 3 x $’s on a project that is a low priority. There is also a consideration of the ROI on 3 x $’s so that the time of implementation is considered. But at the highest level, an objective priority helps to focus a companies people on what is important. This style of project management is compatible with agile methodologies for software development and can be pushed down to further break down a project.
  3. Change Management – Everything changes, infrastructure, code specifications, business priorities, security, EVERYTHING. How do you manage that change? Many of the compliance standards (ISO9000, PCI-DSS) audit this. So when we look at this we look at all the elements of the project and what the company does. This gives guidance as to how change is being handled. There are so many ways of doing change management but when you look at what the company does to make money then you get an understanding of the changes. And that helps to answer the next questions of Version management. Most change management follows the 5 x W’s 1. Who requested the change? 2. Why did they request the change? 3. What will change? 4. When will it go into effect? 5. Who will implement the change? The change management systems can track this information, then, at a high level, you have change management under control.
  4. Version Management – is driven largely by the change management systems that you have in place and tools. Because I have a software background I like to have all version control as code. I think that IT Infrustruction should be code (ansible) and, the database objects should be stored as code (I will talk more about this in another article), and computer software should be stored as code. Documents do not fit so well into version control tools such as Git. There are many version control systems supporting different sets of tools. I personally like Git as does the software industry. I like Document collaboration tools such as GSuite. But there are different toolsets based on company requirements. The choice of the Version Management system depends on 1 x A – What are the artefacts of the company. Usually, it comes down to 2 version management systems and ensuring that we have a 90% fit of the artefact with the version management tool.

Is your company addressing the Basics?

Back 2 Basics Programming Learn More

Git Branching

Firstly, credit where credit is due. This image was republished with permission from Vincent Driessen, which first appeared here. This insight into Git branching strategies has been applied to many organisations and software development projects. Thanks Vincent At B2B we encourage best practice of programming techniques that suit your development style, your products and your company.

Continuous Integration, Continuous Delivery and unit testing are very important. The techniques and tools that we work with are many and varied. You will not, for example, find any religious zealots advocating full TDD for your company. We will talk about code coverage for unit testing, and apply some guidelines and pragmatic steps to achieve great results. Very soon your team will be developing faster, more reliable and loving it!